home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Information / Digests / MacScripting Digest / The Digests / mac-script-94-04.txt < prev    next >
Encoding:
Text File  |  1994-05-09  |  539.5 KB  |  11,744 lines  |  [TEXT/R*ch]

  1. Subject: April MacScripting Digest
  2. Date: Mon, 02 May 94 17:02:40 -0500
  3. From: Fred Terry <pfterry@lks.csi.com>
  4.  
  5.  
  6. This is the April digest of the MacScripting mailing list.
  7.  
  8. =========================================================================
  9. Date:         Thu, 31 Mar 1994 15:45:33 PDT
  10. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12. From:         "Adam C. Engst" <ace@TIDBITS.COM>
  13. Organization: TidBITS
  14. Subject:      Frontmost memory leak
  15.  
  16. Someone forwarded this to me - I can't vouch for it's accuracy, but
  17. I thought I'd mention it so people could either say it's not true
  18. or be aware of it...
  19.  
  20. cheers ... -Adam
  21.  
  22. # 3.  I have found that when using the FrontMost editor (AppleScript 1.1) or
  23. # running a droplet built using same, that 100k to 400k of system heap is used
  24. # but not released when those appls are quit.  We have tried it on Macs from
  25. # the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
  26. # Someone at SOS-APPl is looking into it, but while on the phone, he quietly
  27. # admitted he is running Sys 7.5!
  28.  
  29. --
  30. Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
  31. Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
  32. =========================================================================
  33. Date:         Fri, 1 Apr 1994 08:21:58 EST
  34. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  35. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  36. From:         "Ronald J. Logsdon" <RJ@SHEBUTE.COM>
  37. Subject:      UNSUBSCRIBE APPLESCRIPT
  38.  
  39. UNSUBSCRIBE APPLESCRIPT rj@shebute.com
  40.  
  41. Ronald J. Logsdon
  42. Shebute'
  43.  
  44. http://Shebute.com/Humans/RJ_Logsdon.HTML
  45. =========================================================================
  46. Date:         Fri, 1 Apr 1994 08:30:54 EST
  47. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  48. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  49. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  50. Subject:      MS: One More Time
  51.  
  52. We've had to unsub attempts to the main list in as many days, so it is time
  53. to send this out again. Please retain this for your records and refer to it
  54. when you need to change your status on the list.
  55.  
  56. For the record, the list name is "MACSCRPT" and should be addressed as such
  57. to "Listserv@dartmouth.edu" rather than to this list or to the request list
  58. (the latter of which should be used when you need to speak to a human
  59. administrator of this list when something goes wrong with the listserv
  60. program itself).
  61.  
  62. The relevent addresses you need to know are as follows:
  63.  
  64. * LISTSERV@dartmouth.edu
  65.     the master controller. Mail is handled by computer
  66.     so you have a limited set of commands you can send it.
  67.     (Sending the HELP command will get you basics on this
  68.     including instructions on how to sign off the list and
  69.     set basic options for yourself like whether you want to
  70.     receive the list in digest format or not)
  71.  
  72. * MacScripting-Request@dartmouth.edu
  73.     Fred Terry and Andy J. Williams, the list administrators.
  74.     We can be contacted when you have a problem with the LISTSERV
  75.     program above or when you have any administrative questions.
  76.  
  77. * MacScripting@dartmouth.edu
  78.     the distribution list. Mail sent here goes to
  79.     all the recipients.
  80.  
  81.  
  82. If you have ANY questions at all please contact us at
  83. MacScripting-Request@dartmouth.edu.
  84.  
  85. -A
  86. =========================================================================
  87. Date:         Fri, 1 Apr 1994 07:49:53 -0600
  88. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  89. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  90. From:         Stewart-CIC-IS <Stewart-CIC-IS%micmac@REDSTONE-EMH2.ARMY.MIL>
  91. Subject:      Re: Hypercard won't save
  92.  
  93. Hi!  I've been lurking for a couple of weeks, and know nothing about
  94. AppleScript.  But I saw a similar message on the HC listserver--so I'm
  95. cross-posting their answer.  (Is that illegal?  ;-)
  96.  
  97. >"Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU> asks:
  98. >As an aside, HCv2.2 SAYS it can build stand-alone applications from system
  99. >7, and all the blurb's in the manual, and I even get SOME of the stuff they
  100. >say when I try to "Save a Copy", but I DON'T get the pop-up list of
  101. >File-Types as the manual states.  I'm using system 7.1 (which I would HOPE
  102. >would be backwardly compatible with system 7????)  Any takers? Or should I
  103. >post this question on the HC listserver?
  104.  
  105. >From yesterday's HC listserver--->
  106. >I have a problem with creating a standalone version of a HyperCard 2.2 stack.
  107. >It has been noted that to do this you need to choose 'Save a Copy' from the
  108. >File menu, and a pop-up menu of File-Type should then enable you to save it is
  109.  
  110. >a StandAlone.
  111. >
  112. >The problem is that when I do this, there is no pop-up menu, just a field
  113. >indicating that it is saving it as File-Type : Stack.
  114. >
  115. >The book says that this requires systems 7.
  116. >I am using system 7.1 on a Centris 660AV. I have also tried this on a LCIII
  117. >and a Quadra 800 with the same result.
  118. >
  119. >Has anyone had a similar problem, or have I missed a simple step somewhere.
  120. >
  121.  
  122. Their answer-->
  123. >Yes, Mike, I had the same problem.  Move the translators to the systems file
  124. >and make sure applescript is in the HC directory.  Then you will get the
  125. proper
  126. >dialog box.  But be prepared: standalone stacks are huge.  Sample: one of my
  127. >stacks went from 24K to 800K.
  128. >Regards, STan Sulkes
  129. >sulkes@ucbeh.san.uc.edu
  130.  
  131. I don't deserve any credit for this answer.  :-)  Good Luck!
  132.  
  133. Marcus
  134. stewart-cic-is@redstone-emh2.army.mil
  135. =========================================================================
  136. Date:         Fri, 1 Apr 1994 08:53:15 -0600
  137. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  138. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  139. From:         K J Fox <kjfox@MKE.AB.COM>
  140. Subject:      Re: Frontmost memory leak
  141.  
  142. ># 3.  I have found that when using the FrontMost editor (AppleScript 1.1) or
  143. ># running a droplet built using same, that 100k to 400k of system heap is used
  144. ># but not released when those appls are quit.  We have tried it on Macs from
  145. ># the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
  146. ># Someone at SOS-APPl is looking into it, but while on the phone, he quietly
  147. ># admitted he is running Sys 7.5!
  148. >
  149.  
  150. Regarding the memory leak with FrontMost... I've written one application
  151. with it and did some recent checking.  It appears that each successive
  152. launch of the application grabs another 100-300K of memory by the System as
  153. shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  154. see the specific size of my system heap though (any ideas??)  At the start,
  155. my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  156. No other apps were launched.  I guess it's time to reboot!
  157.  
  158. kjf
  159.  
  160. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  161. Kenneth J. Fox
  162. Rockwell Automation - Allen Bradley Co.
  163. Milwaukee, WI (414)382-3287
  164. kjfox@mke.ab.com
  165. =========================================================================
  166. Date:         Fri, 1 Apr 1994 06:57:00 PST
  167. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  168. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  169. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  170. Subject:      Re: Applescript 1.1 upgrade:  Worth it?
  171.  
  172. >Sorry if I you talked about this earlier and I missed it.... I bought the
  173. >AppleScript Developer's Toolkit 1.0 from APDA back in December.  Price was
  174. >$199.  I just called them and they said the upgrade to version 1.1 is $99.
  175. >That seems a bit much for an incremental upgrade!  What are the new
  176. >features in 1.1?  Is it worth it?
  177.  
  178. Well, AS 1.1 is certainly much improved over 1.0.  Its faster, and it seems
  179. more stable.  The other item you get with the upgrade to the Developers Kit
  180. is Frontmost, an AppleScript based interface builder.  All the other
  181. elements of the package (example code and utilities) are pretty much
  182. unchanged.
  183.  
  184. -Mark
  185. =========================================================================
  186. Date:         Fri, 1 Apr 1994 09:03:19 -0600
  187. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  188. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  189. From:         Fred Terry <pfterry@LKS.CSI.COM>
  190. Subject:      Re: Frontmost memory leak
  191. In-Reply-To:  Your message of "Fri, 01 Apr 94 08:53:15 CST"
  192.  
  193. >
  194. >Regarding the memory leak with FrontMost... I've written one application
  195. >with it and did some recent checking.  It appears that each successive
  196. >launch of the application grabs another 100-300K of memory by the System as
  197. >shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  198. >see the specific size of my system heap though (any ideas??)  At the start,
  199. >my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  200. >No other apps were launched.  I guess it's time to reboot!
  201.  
  202. Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
  203. should be able to examine the individual blocks.
  204.  
  205. pf
  206.  
  207.  
  208. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  209. pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
  210. =========================================================================
  211. Date:         Fri, 1 Apr 1994 09:41:44 PST
  212. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  213. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  214. From:         Lawrence Wood <lawrencw@MICROSOFT.COM>
  215. Subject:      Re: Example Excel AppleScripts?
  216.  
  217. Hi,
  218.           There should be excel examples on gaea but I'll have to look
  219. to make sure.  If
  220. not I really dont know where to find any examples.  As for the Excel
  221. SDK (which the
  222. manual refers to) is very AppleEvent oriented, but, AppleEvents and
  223. AppleScript are
  224. VERY closely tied together.  Really the only way I know to learn about
  225. Excel3&4 is to
  226. open the application's dictionary and use what it shows.  Since all you
  227. can really do
  228. is get or set things it's not too bad.  You can also 1. Evaluate
  229. formulas, 2. Execute a
  230. macro command, 3. Execute an entire macro.  Good luck.
  231.  
  232. lw
  233. **********************************************************************
  234. *****************************
  235. #include<stddisclaimer.h>  These are my ramblings and do not represent my
  236. employer, etc.
  237. **********************************************************************
  238. *****************************
  239.  
  240. ----------
  241. From: Stephen Jonke  <netmail!jonke@GSFC.NASA.GOV>
  242. To: Multiple recipients of list MACSCRPT  <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
  243. Subject: Example Excel AppleScripts?
  244. Date:  29 Mar, 94 5:03PM
  245.  
  246. Does anyone have any examples of AppleScripting Excel that I could look at?
  247. I looked on gaea, but there were no Excel AppleScripts there.  Also, are
  248. there any guides available for AppleScripting Excel?  The document
  249. mentioned in the Excel manual seems to be oriented toward AppleEvents, as
  250. opposed to AppleScript (i.e. low level).
  251.  
  252. Steve
  253.  
  254. ---------------------
  255.  jonke@gsfc.nasa.gov
  256. ---------------------
  257. =========================================================================
  258. Date:         Fri, 1 Apr 1994 15:42:13 -0800
  259. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  260. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  261. From:         Jamie Lawrence <jamiel@SYBASE.COM>
  262. Subject:      scripting MS Excel
  263.  
  264. Does anyone wanna give a poor, frustrated excel-scripting wannabe some
  265. example script they have laying around to send and recieve data using
  266. Excel? I can't seem to find the proper syntax to get anything back and
  267. forth. Through a macro I could make sure the particular data in question
  268. could be selected (even though I want to be able to get more complex data
  269. later), but I can't even use this because the script editor won't accept
  270. the class 'selection-object', which I found in Excel's dictionary. It
  271. thinks I mean selection minus object.
  272.  
  273. Help please?
  274.  
  275. thanks-
  276. jamie
  277. =========================================================================
  278. Date:         Fri, 1 Apr 1994 15:58:51 -0800
  279. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  280. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  281. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  282. Subject:      Re: scripting MS Excel
  283.  
  284. At 15:42 4/1/94 -0800, Jamie Lawrence wrote:
  285. >Does anyone wanna give a poor, frustrated excel-scripting wannabe some
  286. >example script they have laying around to send and recieve data using
  287. >Excel? I can't seem to find the proper syntax to get anything back and
  288. >forth. Through a macro I could make sure the particular data in question
  289. >could be selected (even though I want to be able to get more complex data
  290. >later), but I can't even use this because the script editor won't accept
  291. >the class 'selection-object', which I found in Excel's dictionary. It
  292. >thinks I mean selection minus object.
  293.  
  294.  
  295. tell application "Microsoft Excel"
  296.     set foo to selection
  297.     get value of foo
  298. end tell
  299.  
  300.  
  301. That returns the value of the currently selected cell.  If the current
  302. selection is a range of cells, you get a list, something like this one
  303. (this is burn-before-reading secret data):  {{"191.5"}, {"189.5"},
  304. {"188.5"}, {"189.5"}, {"189"}, {"189.5"}, {"188.5"}, {"189.5"}, {"188.5"}}
  305.  
  306. You can do things like
  307.  
  308. set value of cell 1 of row 6 to -99
  309.  
  310. or, as above
  311. set foo to selection
  312. set value of foo to 120.5
  313.  
  314. [It shouldn't be necessary to have the intermediate variable, but it seems
  315. to be.]
  316.  
  317.    Hope these help.  Keep trying...it really does work
  318.  
  319. --
  320. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  321. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  322. =========================================================================
  323. Date:         Fri, 1 Apr 1994 22:59:22 -0500
  324. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  325. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  326. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  327. Subject:      Acid Jazz
  328.  
  329. Acid Jazz is an Application, but I believe that version 1.1v1 was already
  330. on gaea, it is NOT new. the "Dial Number" script in my "matt's Scripts"
  331. uses Acid Jazz.
  332.  
  333. --
  334. My opinions are mine only and tentative, pending further data
  335.                         Matthew Ahrens
  336. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  337. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  338. =========================================================================
  339. Date:         Sat, 2 Apr 1994 12:22:11 -0500
  340. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  341. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  342. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  343. Subject:      sending raw appleevents
  344.  
  345. OK, I know how to send a raw appleEvent to an application, such
  346. as the finder. my question is this: I have an application that claims
  347. to support AppleEvents, but it isn't appleScriptable. how do i
  348. figure out the AppleEvents that it supports. I looked at it in ResEdit
  349. but didn't find anything obvious.
  350.  
  351. thanx mucho!
  352.  
  353. ps. the app I am trying to do this with is "FilePlayer 2.0" but there are
  354. other apps I would like to send appleEvents to also.
  355.  
  356. --
  357. My opinions are mine only and tentative, pending further data
  358.                         Matthew Ahrens
  359. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  360. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  361. =========================================================================
  362. Date:         Sat, 2 Apr 1994 10:14:11 -0800
  363. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  364. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  365. From:         Mike Cohen <isis@NETCOM.COM>
  366. Subject:      Re: sending raw appleevents
  367. In-Reply-To:  <199404021809.KAA04289@mail.netcom.com> from "Matthew Ahrens" at
  368.               Apr 2, 94 12:22:11 pm
  369.  
  370. >
  371. > OK, I know how to send a raw appleEvent to an application, such
  372. > as the finder. my question is this: I have an application that claims
  373. > to support AppleEvents, but it isn't appleScriptable. how do i
  374. > figure out the AppleEvents that it supports. I looked at it in ResEdit
  375. > but didn't find anything obvious.
  376.  
  377. Get the AEHandler FKEY (it's on the AppleScript & various developer CDs). It
  378. will display all of the current application & system AppleEvent and Coercion
  379. handlers. Unfortunately, some applications just install handlers for an entire
  380. class or even '****', so it won't tell much in that case.
  381.  
  382. --
  383. Mike Cohen           | "Software that means business"
  384. ISIS International   |
  385. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  386. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  387. =========================================================================
  388. Date:         Sat, 2 Apr 1994 10:31:32 -0800
  389. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  390. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  391. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  392. Subject:      Re: sending raw appleevents
  393.  
  394. At 12:22 4/2/94 -0500, Matthew Ahrens wrote:
  395. >OK, I know how to send a raw appleEvent to an application, such
  396. >as the finder. my question is this: I have an application that claims
  397. >to support AppleEvents, but it isn't appleScriptable. how do i
  398. >figure out the AppleEvents that it supports. I looked at it in ResEdit
  399. >but didn't find anything obvious.
  400.  
  401.  
  402. You can't learn everything without the cooperation of the developer of the
  403. application.  [The easiest way to find out is to be told.]
  404.  
  405. Barring that, until recently the Developer CDs had a little FKEY which puts
  406. up a window showing every AE-related handler installed by the front-most
  407. application, and every installed System-level handler.  Warning...this FKEY
  408. crashes when sufficiently-new Finder versions are in front...7.1.3 is
  409. sufficiently new.  This could well be why the FKEY disappeared.
  410.  
  411. [You can, if you are very patient, use the FKEY to lead you to the
  412. handlers, and MacsBug or whatever to disassemble them, so in principle you
  413. can learn everything there is to learn about the application's AE support.
  414. It would be easier to write your own application.  The FKEY can also be
  415. used to remove handlers, and exercise them, although I haven't tried
  416. either.]
  417.  
  418. Note that some applications install a wildcard handler:  class '****', id
  419. '****'.  Any event not dispatched to something more specific goes there.
  420. [Frontier does that, and has a table (system.verbs.traps) into which one
  421. can put a subtable for a class ('misc' is in the as-shipped Frontier).  The
  422. tables contain scripts which are named for the event id (the 'misc' table
  423. ships with 'dosc').  [Meaning one can customize Frontier to accept many
  424. different events.]
  425.  
  426. So just seeing all the posted handlers doesn't necessarily tell you what
  427. events an application handles.  It also doesn't tell you anything about
  428. what the parameters are for non-standard events (or whether the parameters
  429. for standard events are standard).
  430.  
  431.   --JOhn
  432.  
  433. --
  434. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  435. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  436. =========================================================================
  437. Date:         Sat, 2 Apr 1994 19:30:27 -0500
  438. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  439. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  440. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  441. Subject:      coercing file references to anything
  442.  
  443. i can't seem to coerce a file reference to anyhting else. for example,
  444.  
  445. (file "Duo-Gnosis:test") as string
  446. or
  447. (file "Duo-Gnosis:test") as alias
  448. or
  449. alias (file "Duo-Gnosis:test")
  450.  
  451. result in an error: Can't get file "File "Duo-Gnosis:test"
  452.  
  453. I am using AppleScript 1.0, if it matters.
  454.  
  455. --
  456. My opinions are mine only and tentative, pending further data
  457.                         Matthew Ahrens
  458. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  459. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  460. =========================================================================
  461. Date:         Sat, 2 Apr 1994 19:31:15 -0500
  462. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  463. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  464. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  465. Subject:      posting AppleScript Extension
  466.  
  467. would someone with the AppleScript Developer's Kit ver 1.1 be so
  468. kind as to post the applescript extension 1.1 on gaea or info-mac?
  469. I believe that if you read the liscence, you can distribute the
  470. extension to anyone.
  471.  
  472. on a side issue, are there any changes in the Script Editor from ver
  473. 1.0 to 1.1
  474.  
  475. (I have AS 1.0, which I got with TAO of applescript. does anyone know
  476. if they are offoring an upgrade to AS 1.1?)
  477.  
  478. --
  479. My opinions are mine only and tentative, pending further data
  480.                         Matthew Ahrens
  481. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  482. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  483. =========================================================================
  484. Date:         Sat, 2 Apr 1994 20:21:50 EST
  485. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  486. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  487. From:         "William J. Jamison" <jami1@AOL.COM>
  488. Subject:      Re: Frontmost memory leak
  489.  
  490. ">Regarding the memory leak with FrontMost... I've written one application
  491. ">with it and did some recent checking.  It appears that each successive
  492. ">launch of the application grabs another 100-300K of memory by the System as
  493. ">shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  494. ">see the specific size of my system heap though (any ideas??)  At the start,
  495. ">my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  496. ">No other apps were launched.  I guess it's time to reboot!
  497.  
  498. "Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
  499. "should be able to examine the individual blocks.
  500.  
  501. "pf
  502.  
  503. You could also use NowMenus Memory View
  504.  
  505. Jami1
  506. =========================================================================
  507. Date:         Sat, 2 Apr 1994 21:29:54 -0800
  508. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  509. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  510. From:         Jon Pugh <jonpugh@NETCOM.COM>
  511. Subject:      Re: sending raw appleevents
  512.  
  513. >You can't learn everything without the cooperation of the developer of the
  514. >application.  [The easiest way to find out is to be told.]
  515.  
  516. This is the truth.
  517.  
  518. >Barring that, until recently the Developer CDs had a little FKEY which puts
  519. >up a window showing every AE-related handler installed by the front-most
  520. >application, and every installed System-level handler.  Warning...this FKEY
  521. >crashes when sufficiently-new Finder versions are in front...7.1.3 is
  522. >sufficiently new.  This could well be why the FKEY disappeared.
  523.  
  524. This is not.  :)
  525.  
  526. I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  527. It probably got skipped because Ed didn't remember to resubmit it.  That's
  528. kind of an annoying bother, particularly if you write a lot of stuff, and
  529. Ed Lai has.
  530.  
  531. >[You can, if you are very patient, use the FKEY to lead you to the
  532. >handlers, and MacsBug or whatever to disassemble them, so in principle you
  533. >can learn everything there is to learn about the application's AE support.
  534. >It would be easier to write your own application.  The FKEY can also be
  535. >used to remove handlers, and exercise them, although I haven't tried
  536. >either.]
  537.  
  538. This is probably what made you think it crashed.  This FKEY throws you
  539. rather unceremoniously into Macsbug (and probably TMON too, if I know Ed)
  540. with a disassembly of the handler code that gets that event or coercion.
  541. Nice for setting breakpoints.  I just wish it knew about the osax machanism
  542. and took me to the osax code itself instead of the osax loader code which
  543. handles all the osax events.
  544.  
  545. I've never seen the AEInteraction FKEY crash, and I use it a lot.  You can
  546. find it on the AppleScript CD too.
  547.  
  548. Jon
  549. =========================================================================
  550. Date:         Sun, 3 Apr 1994 08:20:03 -0700
  551. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  552. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  553. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  554. Subject:      Re: sending raw appleevents
  555.  
  556. >>Barring that, until recently the Developer CDs had a little FKEY which puts
  557. >>up a window showing every AE-related handler installed by the front-most
  558. >>application, and every installed System-level handler.  Warning...this FKEY
  559. >>crashes when sufficiently-new Finder versions are in front...7.1.3 is
  560. >>sufficiently new.  This could well be why the FKEY disappeared.
  561. >
  562. >This is not.  :)
  563.  
  564. Yes...last evening I noticed that the FKEY is back on the April Developer CD.
  565.    From one of the CDs where I looked for it, it was notable by its
  566. absence:  listed in the summary part of the documentation of the FKEY
  567. collection, details ripped out of the document, and not in the folder with
  568. the others.  Since I noticed this after the FKEY started crashing for me, I
  569. seem to have made a faulty assumption.
  570.  
  571. >
  572. >I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  573.  
  574. Here, ever since going to Finder 7.1.3, the FKEY crashed immediately upon
  575. being called up with Finder in front.  So I gave up trying.
  576.  
  577. After experiment:  the FKEY is fine on "Zeus", the 8100.  It still crashes
  578. on the IIci (clever name:  "JWB").  Bus error at ... while fetching
  579. instructions from 5C44B854 and 5C44B856 (not surprising that it can't do
  580. that).
  581.  
  582. I guess it's time to reinstall some things on the IIci.
  583.  
  584. Thanks for the correction [again].  --John
  585.  
  586. --
  587. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  588. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  589. =========================================================================
  590. Date:         Mon, 4 Apr 1994 01:21:18 -0500
  591. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  592. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  593. From:         Sean Elfstrom <selfstro@ENGR.TRINITY.EDU>
  594. Subject:      -108 and -1752 errors
  595.  
  596. What causes these errors when I try to run a script from the Finder
  597. using OSAMenu? I have Sys 7.1 and AppleScript 1.0. If I'm in another
  598. app, and try to run the same scripts, it generally works, but since
  599. I'm trying to work with Finder Selections via Jon's Commands, I'd
  600. like for it to work in the Finder as well.
  601.  
  602. --
  603. ---------------------------------------------------------------------
  604. Sean Elfstrom                            | Trinity University
  605. selfstro@cs.trinity.edu                  | 715 Stadium Dr. #707
  606. NeXTMail: selfstro@oberon.cs.trinity.edu | San Antonio, TX 78212-7200
  607. =========================================================================
  608. Date:         Sun, 3 Apr 1994 16:16:36 PDT
  609. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  610. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  611. From:         "Adam C. Engst" <ace@TIDBITS.COM>
  612. Organization: TidBITS
  613. Subject:      FrontMost memory leak
  614.  
  615. The latest word on the FrontMost memory leak...
  616.  
  617. cheers ... -Adam
  618.  
  619. >     I finally heard from Apple (SOS-APPL) after a couple of weeks and a
  620. > little prodding.  This concerned the problem I mentioned about memory losses
  621. > when using the FrontMost portion of AppleScript.
  622. >
  623. >     Apple confirmed the bug that eats up 100k to 400k after each FrontMost
  624. > execution.  They are looking into it, and so don't know if or when they will
  625. > have a solution.  They also don't know how a solution might come  --  in a
  626. > patch or wait for a release.
  627. >
  628. >        Rick Hyman
  629.  
  630. --
  631. Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
  632. Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
  633. =========================================================================
  634. Date:         Mon, 4 Apr 1994 09:46:51 -0500
  635. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  636. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  637. From:         Fred Terry <pfterry@LKS.CSI.COM>
  638. Subject:      Re: Example Excel AppleScripts?
  639. In-Reply-To:  Your message of "Fri, 01 Apr 94 09:41:44 PST"
  640.  
  641. >There should be excel examples on gaea but I'll have to look
  642. >to make sure.  If
  643. >not I really dont know where to find any examples.  As for the Excel
  644. >SDK (which the
  645. >manual refers to) is very AppleEvent oriented, but, AppleEvents and
  646. >AppleScript are
  647. >VERY closely tied together.  Really the only way I know to learn about
  648. >Excel3&4 is to
  649. >open the application's dictionary and use what it shows.  Since all you
  650. >can really do
  651. >is get or set things it's not too bad.  You can also 1. Evaluate
  652. >formulas, 2. Execute a
  653. >macro command, 3. Execute an entire macro.  Good luck.
  654.  
  655. I haven't put any out there, but there are some on one of the AppleScript CDs.
  656. I'm trying to find out if I can put them on gaea with the FileMaker ones. If
  657. not, you could always find someone with the CD (think it was the beta one).
  658. You might want to look at
  659.  
  660. ftp://gaea.kgs.ukans.edu/applescript/docs/xldoc.hqx
  661.  
  662. I'll keep you posted on my progress with the examples.
  663.  
  664. pf
  665.  
  666.  
  667. +++++++++++opic I
  668. have started, could you please resend your message?
  669.  
  670. I was having some problems with my mailer and your mail may have been lost.
  671.  
  672. thanx a lot, and sorry for the bandwith!
  673.  
  674. --
  675. My opinions are mine only and tentative, pending further data
  676.                         Matthew Ahrens
  677. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  678. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  679. =========================================================================
  680. Date:         Mon, 4 Apr 1994 20:05:56 -0600
  681. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  682. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  683. From:         Brian Gaines <gaines@FSC.CPSC.UCALGARY.CA>
  684. Subject:      Re: using Finder Scripting Tool
  685.  
  686. In message <199404050041.SAA07033@fsa.cpsc.ucalgary.ca> Macintosh Scripting
  687. Systems writes:
  688. >                       using Finder Scripting Toolkit
  689. > Okey-dokey,
  690. > I'm really frustrated here. Has anyone been using Dan Ranson's Finder
  691. > Scripting
  692. > Toolkit with any success? If so what am I doing wrong? I'm trying the most
  693.  
  694. Mark your posted material seems to have got a bit corrupted and I couldn't
  695. see what was going on. However, I can confirm that the finder events do
  696. work as specified. They don't seem to do any coercion so you have to have
  697. exactly the structure specified, ie an alias to the folder and a list of
  698. aliases to files.
  699.  
  700. One thing you CAN get away with that helps a lot is that the alias to the
  701. folder can be an alias to a file within the folder. This means, for example,
  702. that if you are just opening one file you can use the same alias in both
  703. positions.
  704.  
  705. I've been using the finder calls successfully in scripts within my application
  706. both on the local machine and across the net. They are very neat compared
  707. with loading the whole of finderlib.
  708.  
  709. b.
  710.  
  711.  
  712. Brian Gaines              Knowledge Science Institute, University of Calgary
  713. gaines@cpsc.ucalgary.ca   Calgary, Alberta, Canada T2N 1N4
  714. =========================================================================
  715. Date:         Tue, 5 Apr 1994 11:54:30 +0930
  716. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  717. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  718. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  719. Subject:      Thanks!
  720.  
  721. To all of you out there who responded to my problems regarding
  722. Applescripting FileMakerPro from Hypercard2.2 - Thanks.
  723.  
  724. I now have HC2.2 producing stand-alone applications (apparently I hadn't
  725. transferred the StackToApp extension to my extensions folder (pity the HC
  726. installation doesn't do this for you).
  727.  
  728. I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
  729. still trying.  I can do it from HC, but its certainly not "pretty".
  730.  
  731. So, thanks again!
  732.  
  733. Paul J. Stoll
  734. Computer Assisted Learning Unit
  735. Flinders University of South Australia
  736. Flinders Medical Centre
  737. Bedford Park.  5042.
  738. South Australia.
  739. =========================================================================
  740. Date:         Mon, 4 Apr 1994 23:22:21 -0700
  741. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  742. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  743. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  744. Subject:      Re: Thanks!
  745.  
  746. At 11:54 4/5/94 +0930, Paul J. Stoll wrote:
  747. >I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
  748. >still trying.  I can do it from HC, but its certainly not "pretty".
  749.  
  750. That can be done from a UserTalk (Frontier) script, but you also (under
  751. Frontier) need to bring FileMaker to the front before the open message.
  752.  
  753.    --John
  754.  
  755. --
  756. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  757. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  758. =========================================================================
  759. Date:         Tue, 5 Apr 1994 20:34:59 CST
  760. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  761. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  762. From:         Jiaw-yih Hwang <joy1@MAIL.NCKU.EDU.TW>
  763. Subject:      Scriptible Communication Software:?
  764.  
  765. Hi! Netter:
  766. Is there any coummunication software which could eastablish a SLIP conection 
  767. and
  768. could be scripted.
  769.  
  770. ====================================================================
  771.         /=====|     Jiaw-yih Hwang
  772.        /      |     Department of Interior Design,
  773.       /       |     Tainan Junior College of Home Economics, Taiwan
  774.     ============    ------------------------------
  775.      []-[]----}     joy1@mail.ncku.edu.tw
  776.       /_            ------------------------------
  777.        ==           "Less is More."
  778.        [_           "These are rumors. I reserve the right to be wrong."-Murph
  779. ====================================================================
  780. =========================================================================
  781. Date:         Tue, 5 Apr 1994 09:13:44 -0400
  782. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  783. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  784. From:         John Schettino <js12@GTE.COM>
  785. Subject:      Re: reading the contents of a text file
  786.  
  787. >I am running version 1.1 of Applescript with a powermac 8100 and they
  788. >appears to be a major bug in Apple script.  I was wondering if anyone else
  789. >had seen this.
  790. >
  791. >Although the stuff is impossible to read it appears to work.
  792. >
  793. >
  794. >Comments or suggestions?
  795.  
  796. I'd re-install AS 1.1 - this is not normal. Your dialect file may be
  797. trashed. You can also try going into the script editor's edit,applescript
  798. formatting..., and choose defaults to see if that clears it up.
  799.  
  800.  
  801. - john
  802.  
  803. -----------------------------------------
  804. js12@gte.com                      GTE Laboratories
  805. John Schettino                           Waltham, MA
  806. =========================================================================
  807. Date:         Tue, 5 Apr 1994 08:41:28 -0500
  808. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  809. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  810. From:         Fred Terry <pfterry@LKS.CSI.COM>
  811. Subject:      Re: Scriptible Communication Software:?
  812. In-Reply-To:  Your message of "Tue, 05 Apr 94 20:34:59 CST"
  813.  
  814. >Hi! Netter:
  815. >Is there any coummunication software which could eastablish a SLIP conection a
  816. >nd
  817. >could be scripted.
  818. >
  819.  
  820. Pick up a copy of InterSlip AE. You'll find it at
  821. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/InterSLIP_AE_1.0b1.sit.hqx
  822.  
  823. Cheers.
  824.  
  825. pf
  826.  
  827.  
  828. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  829. pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
  830. =========================================================================
  831. Date:         Tue, 5 Apr 1994 11:14:21 -0400
  832. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  833. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  834. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  835. Subject:      Where is drag manager?
  836.  
  837. I guess the subject says it all. where can I find the drag Manager,
  838. if it is available yet.
  839.  
  840. tia!
  841.  
  842. --
  843. My opinions are mine only and tentative, pending further data
  844.                         Matthew Ahrens
  845. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  846. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  847. =========================================================================
  848. Date:         Tue, 5 Apr 1994 11:46:34 -0400
  849. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  850. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  851. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  852. Subject:      Re: coercing file references to anything
  853.  
  854. Leonard Rosenthol <leonardr@NETCOM.COM> mentioned that i
  855. am trying to do a double coercion. i am not. i am
  856. trying to do anything useful with the "Finder Selection" command in
  857. "Jon's Commands". David Ray <daver@NETCOM.COM>
  858.  mentioned that he also has the same
  859. problem in AS 1.0. i also have version 1.0. I have asked before, and
  860. now I am PLEADING. PLEASE SEND ME APPLESCRIPT 1.1! This IS LEGAL.
  861. All that I want is the Extension. if you will read your liscence, it
  862. says that you can distribute the extension & osaxen to anyone you like.
  863.  
  864. thanx very much!
  865.  
  866. --
  867. My opinions are mine only and tentatihe SIZE -1 resource.  Add
  868. >100,000 or so to the second size box in that resource (shown in decimal
  869. >bytes by ResEdit, other editors may differ).  Quit ResEdit or whatever.
  870. >Drag the Finder out of the System Folder (to Trash is OK).  Drag your
  871. >modified Finder into the System folder.  Restart.
  872.  
  873. Just an optimization:  drag the Finder (or any other busy file) out of the
  874. system folder to the desktop.  Option-drag it back and edit that one.
  875. Restart.  It's just a bit less dragging around and you have the old one
  876. lying on the desktop if you need it after you screw up.  ;)
  877.  
  878. >>i can't seem to coerce a file reference to anyhting else. for example,
  879. >>
  880. >>(file "Duo-Gnosis:test") as string
  881. >>or
  882. >>(file "Duo-Gnosis:test") as alias
  883. >>or
  884. >>alias (file "Duo-Gnosis:test")
  885. >
  886. >This is the same problem I have been running into with the Jons Commands
  887. >osax. There is a command called "finder selection" that returns a list
  888. >with format like {file "Mac:folder:file"}. The problem is that if I want
  889. >to use "finder selection" in a script, I can't coerce the result into a
  890. >string. I get an error if I use any of the following:
  891. >
  892. >set theFile to item 1 of finder selection
  893. >return (theFile as string)              <--- error
  894. >
  895. >Jon Pugh who wrote the osax says that he has no problem coercing it into
  896. >a string, using Applescript 1.1. I'm using Applescript 1.0. maybe that's
  897. >the culprit.
  898.  
  899. I just checked with a friend at Apple and he confirms that the file object
  900. specifier to string coercion was added in Applescript 1.1.  I might add an
  901. fss to string coercion to the next version of Jon's Commands.
  902.  
  903. >>I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  904. >>It probably got skipped because Ed didn't remember to resubmit it.  That's
  905. >>kind of an annoying bother, particularly if you write a lot of stuff, and
  906. >>Ed Lai has.
  907. >
  908. >
  909. >Jon is correct...the AE Interaction FKEY works fine with all the Finders
  910. >I've tried it with (through 7.1.4).
  911. >
  912. >What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
  913. >the "Scriptable Finder").  The crash PC is (per Macsbug as seen on my 8100)
  914. >1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
  915. >place to crash]).  Crash seen both with Finder 7.1.3/Finder Scripting
  916. >Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
  917. >on the 8100.  [Proper install from an Installer floppy on the IIci...drag
  918. >install of the extension on the Power Mac.]
  919.  
  920. Hmmm, my Finder is the scriptable one and it works fine for me.  Perhaps
  921. it's a memory related problem.  I have upped my SIZE resource as described
  922. previously.
  923.  
  924. >If it hurts (on your machine), don't do it.
  925.  
  926. Always good advice.
  927.  
  928. >on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 alias", #194#
  929. >        {"Mark's HD:Apps:Microsoft Excel alias"})
  930. >end OpenObjects
  931. >
  932. >Here I have made two aliases, one to the folder at "Mark's HD:Apps:Microsoft
  933. >Excel 4.0:" (alias path "Mark's HD:Apps:Microsoft Excel 4.0 alias"  and the
  934. >other to application at "Mark's HD:Apps:Microsoft Excel 4.0:Microsoft Excel"
  935. >(pointed to by "Mark's HD:Apps:Microsoft Excel alias"). I click the Run button
  936. >and nada. No complaints from the Editor but no action either. It doesn't seem
  937. >to matter where I put the two aliases as long as the paths I give the Editor 
  938. is
  939. >valid.
  940. >
  941. >My intention was to use this set of scripts for networking purposes but I
  942. >haven't yet tried. Is it more reliable over the wire? That would be strangely
  943. >counter-intuitive. Two fellows piped in on my original query--John Pugh and
  944. >Matt Ahrens. Might they have any ideas?
  945.  
  946. Maybe they would...
  947.  
  948. I've been burned by minimal aliases before.  Folder aliases must end in a
  949. colon.  Yours does not.  You might also need to skip the aliases to
  950. aliases.  Try:
  951.  
  952. on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:", --
  953.         {alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:Excel"})
  954. end OpenObjects
  955.  
  956. Jon
  957. =========================================================================
  958. Date:         Tue, 5 Apr 1994 15:12:18 -0400
  959. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  960. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  961. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  962. Subject:      Re: Re> Where is drag manager?
  963.  
  964. Is the drag manager part of System 7 Pro?  Are you talking about the drag
  965. and drop features of Apple Mail, or something else?
  966.  
  967. Steve
  968.  
  969. ---------------------
  970.  jonke@gsfc.nasa.gov
  971. ---------------------
  972. =========================================================================
  973. Date:         Tue, 5 Apr 1994 13:37:43 -0500
  974. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  975. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  976. From:         Jay Martin <jay_martin@POSTOFFICE.AIDT.EDU>
  977. Subject:      Re> Where is drag manager?
  978.  
  979. >>The drag manager must be bought as part of the dev. kit from APDA (it's
  980. >>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  981. >>800-282-2732).
  982. >>
  983. >It was also included on the latest Develop magazine CD.
  984. >
  985. Really? I've only seen the DocViewer interface notes on any of the CD's (both
  986. the Develop CD and the Developer's mailing CD's), not the actual software. I
  987. guess I'd better look closer!
  988.  
  989. Jay
  990. +---------------------------------------+----------------------------------+
  991. | --------------+ Jay M. Martin         | All ideas here are my own and    |
  992. |   +---------- | Alabama Industrial    | in no way reflect my employer's. |
  993. |   | ----------+ Development Training  |                  martin@aidt.edu |
  994. |   +---------------------------------- |                                  |
  995. +---------------------------------------+----------------------------------+
  996. =========================================================================
  997. Date:         Tue, 5 Apr 1994 16:43:28 -0400
  998. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  999. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1000. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  1001. Subject:      Re: Where is drag manager?
  1002.  
  1003. At 10:19 AM 4/5/94 -0500, Jay Martin wrote:
  1004. >>I guess the subject says it all. where can I find the drag Manager,
  1005. >>if it is available yet.
  1006. >
  1007. >The drag manager must be bought as part of the dev. kit from APDA (it's
  1008. >called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1009. >800-282-2732). Supposedly, it's distributed with applications that are
  1010. >drag-aware, but I don't know of any shipping yet. It's not currently
  1011. >distributed with the system software (maybe 7.5?).
  1012.  
  1013. I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
  1014. mailer and the finder seem to exhibit the same behavior that is mentioned
  1015. in December's _Develop_).
  1016.  
  1017. Bob
  1018.  
  1019. --
  1020. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  1021. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  1022.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  1023. =========================================================================
  1024. Date:         Tue, 5 Apr 1994 16:56:14 -0400
  1025. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1026. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1027. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  1028. Subject:      Re: Where is drag manager?
  1029. In-Reply-To:  <no.id> from "Bob Snyder" at Apr 5, 94 04:43:28 pm
  1030.  
  1031. --Bob Snyder wrote:
  1032. >
  1033. >I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
  1034. >mailer and the finder seem to exhibit the same behavior that is mentioned
  1035. >in December's _Develop_).
  1036.  
  1037.     There is limited Drag Manager support for the PowerTalk system of
  1038. System 7 Pro. It is not the full Macintosh Drag and Drop Extension, and
  1039. will not work with anything other than the Finder, AppleMail, and the
  1040. PowerTalk utilities.
  1041.  
  1042. -Hades
  1043. =========================================================================
  1044. Date:         Tue, 5 Apr 1994 17:49:13 -0400
  1045. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1046. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1047. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  1048. Subject:      Scriptable non-AOCE version of QuickMail??
  1049.  
  1050. Subject says it all - does CE Software have a non-AOCE version of QuickMail
  1051. that supports AppleScript?
  1052.  
  1053. Steve
  1054.  
  1055. ---------------------
  1056.  jonke@gsfc.nasa.gov
  1057. ---------------------
  1058. =========================================================================
  1059. Date:         Tue, 5 Apr 1994 14:57:28 PDT
  1060. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1061. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1062. From:         Brian Feinberg <brian@IIT.COM>
  1063. Subject:      MacPPP control source
  1064.  
  1065.     Would it be possible for the author of the MacPPP control OSAX
  1066. to post the source on gaea? I'm another person who's seen the problem
  1067. running it from Frontier, and I'd like to take a look at it, maybe make it
  1068. a UCMD.
  1069.  
  1070. --- Brian
  1071. =========================================================================
  1072. Date:         Tue, 5 Apr 1994 20:02:47 -0400
  1073. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1074. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1075. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  1076. Subject:      Eudora Notify troubles...
  1077.  
  1078. Hi everybody,
  1079.  
  1080.         I've been haveing alot of trouble working with the message list
  1081. returned by Eudora 2.0.2 with a Notify event.  Here's essentially what I've
  1082. been working with:
  1083.  
  1084. --System 7.1 with AppleScript 1.1
  1085.  
  1086. --getting Eudora to notify this applet is no problem, so I omitted it.
  1087.  
  1088. on =ABevent CSOmeNot=BB messageList
  1089.   tell application "Eudora 2.0.2"
  1090.     repeat with thisMessage in messageList
  1091.       try
  1092.         set whofrom to (get Sender of thisMessage)
  1093.       on error errMsg number errNum
  1094.         display dialog errMsg
  1095.       end try
  1096.       display dialog whofrom
  1097.     end repeat
  1098.   end tell
  1099. end =ABevent CSOmeNot=BB
  1100.  
  1101.  
  1102. Ok, here's what's going wrong:  The script compiles fine, but during
  1103. execution it seems to choke on the "set whofrom to (get Sender of
  1104. thisMessage)" line.  The error I get back follows:
  1105.  
  1106. Can't get Sender of message 178 of mailbox "In" of mail folder "".
  1107.  
  1108. The error number is -1728.
  1109.  
  1110. If I just make a new script like this:
  1111.  
  1112. tell application "Eudora 2.0.2"
  1113.   get Sender of message 178 of mailbox "In" of mail folder ""
  1114. end tell
  1115.  
  1116. It works fine.  So, am I missing some kind of coercion here, or what?  I've
  1117. tried coercing thisMessage to reference and text, but niether one works.
  1118. Any ideas?  It's driving me crazy!
  1119.  
  1120.                 Thanks,
  1121.                    Sam
  1122. =========================================================================
  1123. Date:         Tue, 5 Apr 1994 20:49:00 -0500
  1124. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1125. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1126. From:         Headless Pumpkin <sdouglas@HARTFORD.EDU>
  1127. Subject:      Re: Re> Where is drag manager?
  1128.  
  1129. >>>The drag manager must be bought as part of the dev. kit from APDA (it's
  1130. >>>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1131. >>>800-282-2732).
  1132. >>>
  1133. >>It was also included on the latest Develop magazine CD.
  1134. >>
  1135. >Really? I've only seen the DocViewer interface notes on any of the CD's (both
  1136. >the Develop CD and the Developer's mailing CD's), not the actual software. I
  1137. >guess I'd better look closer!
  1138. >
  1139. >Jay
  1140.  
  1141. I didn't find the DragManager on the Develop Bookmark CD either.
  1142.  
  1143. I would recommend however that any graphic artists out there check out
  1144. Pixel Paint Pro 3.0. It is applescriptable, recordable, and comes with
  1145. AppleScript 1.1 and the DragManager!
  1146.  
  1147. This program is wonderful. Oh, and it uses Photoshop plug-ins for good
  1148. measure (Kai's PowerTools!!).
  1149.  
  1150. Cheers,
  1151.  
  1152. -------------------------------------------------------------------------
  1153. Scott Douglass                  *My joys, my griefs, my passions, and   *
  1154. ->sdouglas@hartford.edu<-       *       my powers,                      *
  1155. dithyramb@pan.com               *Made me a stranger.               Byron*
  1156. scott@pumpkin.uucp              http://www.hartford.edu/UofHWelcome.html
  1157. finger me for my public key!    MIME spoken here!
  1158. =========================================================================
  1159. Date:         Tue, 5 Apr 1994 22:58:18 -0500
  1160. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1161. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1162. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1163. Subject:      Eudora Script (save & close)
  1164.  
  1165. Here is a script I'm trying to get to work:
  1166.  
  1167. tell application "Eudora1.4.2"
  1168.         activate
  1169.         make inserthere end of mailbox "Out" of mail folder "" objectclass
  1170. message
  1171.         copy (the clipboard) to field named "" of message named ""
  1172.         copy "Info-Mac" to field named "Subject:" of message named ""
  1173.         save
  1174.         close
  1175. end tell
  1176.  
  1177. The trouble is with the "save" and "close" part.  How can I get Eudora to
  1178. save the message (not queue it) and close the window?
  1179.  
  1180. The Eudora dictionary says:
  1181.         close  reference
  1182.         save  reference  -- the object to save
  1183.  
  1184. I can't figure out what to put in the "reference" part.
  1185.  
  1186. Thanks in advance,
  1187. Chris
  1188. =========================================================================
  1189. Date:         Tue, 5 Apr 1994 22:58:30 -0500
  1190. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1191. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1192. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1193. Subject:      "save/read data" osax
  1194.  
  1195. (gaea.kgs.ukans.edu:applescript/osaxen/savereaddata1.1.cpt.hqx)
  1196.  
  1197. I've been trying to use the "save/read data" osax I found on gaea, but I've
  1198. run into a problem with the syntax on the "save data" part.
  1199.  
  1200. Here is the dictionary:
  1201.  
  1202.    save data: Stores data object in file specified.
  1203.         save data  data  -- data or variable object to store
  1204.                 in  alias  -- path to file to store in
  1205.                 [replacing  yes/no]  -- replace or append data
  1206.                 [type  type class]  -- type of file (default TEXT)
  1207.                 [creator  'sign']  -- creator of file (default 'ttxt')
  1208.                 [erase  boolean]  -- with/without erase   erase or not the
  1209. file before
  1210.                                      write (default yes)
  1211.         Result:   integer  -- error returned from storing (if any)
  1212.  
  1213.  
  1214. Here is what I put in my script:
  1215.  
  1216.         save data newdata in refNum replacing yes
  1217.  
  1218. where newdata is a variable containing a list of data, and refNum is a
  1219. variable containing the path to the file I want to write to.
  1220.  
  1221. Whenever I run the script, it chokes on the line above, saying "Can't make
  1222. some data into the expected type."
  1223.  
  1224. What am I doing wrong?
  1225.  
  1226. Thanks,
  1227. Chris
  1228. =========================================================================
  1229. Date:         Tue, 5 Apr 1994 20:44:26 -0700
  1230. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1231. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1232. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  1233. Subject:      Re: A bunch of stuff
  1234.  
  1235. Jon Pugh (initially quoting me)
  1236.  
  1237. >>What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
  1238. >>the "Scriptable Finder").  The crash PC is (per Macsbug as seen on my 8100)
  1239. >>1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
  1240. >>place to crash]).  Crash seen both with Finder 7.1.3/Finder Scripting
  1241. >>Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
  1242. >>on the 8100.  [Proper install from an Installer floppy on the IIci...drag
  1243. >>install of the extension on the Power Mac.]
  1244. >
  1245. >Hmmm, my Finder is the scriptable one and it works fine for me.  Perhaps
  1246. >it's a memory related problem.  I have upped my SIZE resource as described
  1247. >previously.
  1248.  
  1249.  
  1250. Hmmm...the only way I can get the crash to stop is to remove the Finder
  1251. Scripting Extension.  I've given Finder 200,000 extra bytes, in addition to
  1252. the 100,000 extra I had already given it to make OSAMenu and FinderMenu
  1253. happy.  AND I have run with minimal extensions (just the PowerPC Enabler,
  1254. and the Finder-related PPC-related enabler, and Finder Scripting
  1255. Extension).  Nothing else.  Including ditching the SCSI chain to get rid of
  1256. the (outrageously old...MUST update) SilverLining driver from the external
  1257. hard drive.  No Apple Menu Items, no Control Panels (someone carefully
  1258. makes empty folders where those ought to be).
  1259.  
  1260. It would be time to ask Ed, except that I'm quite sure he has more
  1261. important work to do (more important to his management, and more important
  1262. to *me*, to).
  1263.  
  1264. Thanks for your time, Jon...you caused me to explore more deeply than I
  1265. would have.
  1266.    --John
  1267.  
  1268. --
  1269. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  1270. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  1271. =========================================================================
  1272. Date:         Wed, 6 Apr 1994 01:14:21 -0500
  1273. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1274. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1275. From:         "Carl F Steadman (Carl Steadman)" <stead002@MAROON.TC.UMN.EDU>
  1276. Subject:      Eudora & scripts always running...
  1277.  
  1278. I just finished writing an AppleScript which mails an automatic reply to
  1279. mail which is sent to a particular account, and then redirects the mail to
  1280. a human recipient, which seems to work fine. I have NotifyMail opening
  1281. Eudora when mail arrives at the POP server, and then Eudora sending a
  1282. message to my script using "please notify", which then does its stuff.
  1283.  
  1284. Now, to make everything work, I've had to save as an application, and check
  1285. "Stay Open". Is this the nature of "please notify", or am I doing something
  1286. wrong? I'm thinking Eudora should just be able to launch the script, which
  1287. can then quit when it's done, though I could be thinking wrong.
  1288.  
  1289. On a connected note, how does one quit a script which you've instructed to
  1290. stay open, and have told not to put up dialog boxes? If I attempt to quit,
  1291. it just re-launches - which isn't a problem now, but it was annoying, for a
  1292. time, when I wanted to make changes.
  1293.  
  1294. Thanks.
  1295.  
  1296. Carl
  1297.  
  1298.  Carl Steadman  stead002@maroon.tc.umn.edu  612.626.9750
  1299.    http://www.cdtl.umn.edu/carl.html
  1300. =========================================================================
  1301. Date:         Wed, 6 Apr 1994 03:03:46 -0400
  1302. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1303. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1304. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  1305. Subject:      Re: Eudora & scripts always running...
  1306.  
  1307. I've been playing with Eudora's "please notify" for a while now, and I can
  1308. that I think I know what it does, but I still can't get it to work
  1309. completely :-) (see a previous post by me...)
  1310.  
  1311. Anyway, as I recall, I believe that when you send Eudora a please notify
  1312. event, it saves the name of the calling application as a property, so it
  1313. will start up the application if it is not running, even if Eudora has quit
  1314. and been restarted.  The only way to turn this off, I believe is through
  1315. telling Eudora to specifically turn notifying off for that application.
  1316.  
  1317. As far as getting your stay-open script to quit - that sounds like an error
  1318. in the quit handler to me.  I had the same problem.  The script will
  1319. compile fine, but will encounter a run-time error before it hits the
  1320. continue statement, not report the error, abort the quit handler, and just
  1321. stay open.  It's pretty annoying, and it took me a while to figure this one
  1322. out.
  1323.  
  1324.         Good Luck,
  1325.           Sam
  1326.  
  1327. P.S. If you figure out how to access the fields of the messages of the
  1328. message list Eudora returns on the notify event, please post it or send it
  1329. to me, it's probably really easy, but I just can't get it to work.
  1330.  
  1331. >I just finished writing an AppleScript which mails an automatic reply to
  1332. >mail which is sent to a particular account, and then redirects the mail to
  1333. >a human recipient, which seems to work fine. I have NotifyMail opening
  1334. >Eudora when mail arrives at the POP server, and then Eudora sending a
  1335. >message to my script using "please notify", which then does its stuff.
  1336. >
  1337. >Now, to make everything work, I've had to save as an application, and check
  1338. >"Stay Open". Is this the nature of "please notify", or am I doing something
  1339. >wrong? I'm thinking Eudora should just be able to launch the script, which
  1340. >can then quit when it's done, though I could be thinking wrong.
  1341. >
  1342. >On a connected note, how does one quit a script which you've instructed to
  1343. >stay open, and have told not to put up dialog boxes? If I attempt to quit,
  1344. >it just re-launches - which isn't a problem now, but it was annoying, for a
  1345. >time, when I wanted to make changes.
  1346. >
  1347. >Thanks.
  1348. >
  1349. >Carl
  1350. >
  1351. > Carl Steadman  stead002@maroon.tc.umn.edu  612.626.9750
  1352. >   http://www.cdtl.umn.edu/carl.html
  1353. =========================================================================
  1354. Date:         Wed, 6 Apr 1994 07:11:10 -0500
  1355. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1356. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1357. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1358. Subject:      Re: Eudora Script (save & close)
  1359.  
  1360. Allan Marcus wrote:
  1361. >>The trouble is with the "save" and "close" part.  How can I get Eudora to
  1362. >>save the message (not queue it) and close the window?
  1363.  
  1364. >When you say "save", do you mean save to a disk file (try Save As), or sav
  1365. >to the out box, but don't send (queue: never)?
  1366.  
  1367. Allan,
  1368.  
  1369. I mean to save the newly created message to the out box, so I can address
  1370. it, add comments, and send it later.
  1371.  
  1372.  
  1373. Regards,...Chris
  1374. +--------------------------------------------------------------------------
  1375. Christopher B. Brannon                             University of Pittsburgh
  1376. cbrannon+@pitt.edu        THE*TRUTH*IS*OUT*THERE          Political Science
  1377. =========================================================================
  1378. Date:         Wed, 6 Apr 1994 09:07:20 -0500
  1379. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1380. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1381. From:         "Dennis J. Wilkinson, II" <djw@CRASUN.CRA.COM>
  1382. Subject:      Re: Eudora Notify troubles...
  1383.  
  1384. <script deleted>
  1385.  
  1386. >Ok, here's what's going wrong:  The script compiles fine, but during
  1387. >execution it seems to choke on the "set whofrom to (get Sender of
  1388. >thisMessage)" line.  The error I get back follows:
  1389. >
  1390. >Can't get Sender of message 178 of mailbox "In" of mail folder "".
  1391. >
  1392. >The error number is -1728.
  1393.  
  1394. You mean you're actually getting an error code back? For myself (and
  1395. apparently for Steve Dorner as well) the script just stops. Period. No
  1396. errors, no return code, and if it's a standalone, it keeps running and will
  1397. accept future notification events. I don' get it, either.
  1398.  
  1399. I can iterate over the messages in the "In" folder fine, check if they've
  1400. been read, and take action, but that doesn't do anything for me if
  1401. something's been filtered into another folder by Eudora.
  1402.  
  1403. BTW -- if you do something silly, like, say, having Eudora notify an
  1404. applet, trash the applet, and then have Eudora go looking for things that
  1405. don't exist, you can stop notifying everything you notify by removing the
  1406. 'eNot' resource in the Eudora Settings file with the resource mangler of
  1407. your choice. Eudora will  build a new one on the next Notify.
  1408.  
  1409.  
  1410.  
  1411. -- Dennis
  1412.  
  1413. ----------------------------------------------------------------------------
  1414. Dennis J. Wilkinson, II                 : Usual disclaimers apply. If I put
  1415. djw@crasun.cra.com                      : my foot in my mouth, it's my
  1416. Software Engineer                       : fault, and has nothing at all to
  1417. Charles River Analytics, Cambridge MA   : do with CRA, Inc.
  1418. =========================================================================
  1419. Date:         Wed, 6 Apr 1994 09:51:20 -0500
  1420. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1421. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1422. From:         David Myers <myers@ACEC.COM>
  1423. Subject:      Does Frontier allow custom error handling routines?
  1424.  
  1425. Can I put my own custom error handling routine in a Frontier script?
  1426. Searching through the documentation didn't turn up anything.  Failing
  1427. that, can anybody tell me how to work around this problem in Eudora:
  1428.  
  1429. I use a script called mailSorter() to file away mail from some of the
  1430. more voluminous listservs I subscribe to, in order to separate that
  1431. from personal e-mail.  The script relies on the "Sender" field attached
  1432. to most messages generated from a listserv.  I can call Eudora with
  1433. the following script to find out the Sender field:
  1434.  
  1435. on getSender (i) {
  1436.         local (m);
  1437.         with objectModel, Eudora {
  1438.                 m =-
  1439. David Lewis               lewis@netcom.com                (408) 439-2374
  1440. =========================================================================
  1441. Date:         Wed, 6 Apr 1994 10:22:36 -0400
  1442. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1443. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1444. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  1445. Subject:      Re: Eudora Script (save & close)
  1446.  
  1447. >The trouble is with the "save" and "close" part.  How can I get Eudora to
  1448. >save the message (not queue it) and close the window?
  1449. >
  1450. >The Eudora dictionary says:
  1451. >        close  reference
  1452. >        save  reference  -- the object to save
  1453. >
  1454. >I can't figure out what to put in the "reference" part.
  1455.  
  1456. You made a message at the end of the "Out" mailbox.  Don't you just use the
  1457. same reference?  Alternatively, try using the reference:
  1458.  
  1459.    message 1
  1460.  
  1461. And that's it (no mailbox, no mail folder).  "message 1" by itself always
  1462. references the top most window.  I haven't tried this yet, so let me know
  1463. if it works....
  1464.  
  1465. Steve
  1466.  
  1467. ---------------------
  1468.  jonke@gsfc.nasa.gov
  1469. ---------------------
  1470. =========================================================================
  1471. Date:         Wed, 6 Apr 1994 09:23:23 -0500
  1472. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1473. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1474. From:         "Fred.Terry." <pfterry@LKS.CSI.COM>
  1475. Subject:      Scheduler
  1476.  
  1477. Everyone,
  1478.  
  1479. I've just uploaded a demo version of Mark Alldritt's Scheduler to gaea.
  1480. You'll
  1481. find it in
  1482.  
  1483. ftp://gaea.kgs.ukans.edu/applescript/addons/schedulerdemo.hqx
  1484.  
  1485. Have fun.
  1486.  
  1487. pf
  1488.  
  1489.  
  1490. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1491. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  1492. =========================================================================
  1493. Date:         Wed, 6 Apr 1994 11:45:09 -0500
  1494. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1495. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1496. From:         Allan Marcus <allan_marcus@LANL.GOV>
  1497. Subject:      Re: Eudora Script (save & close)
  1498.  
  1499. >Allan Marcus wrote:
  1500. >>>The trouble is with the "save" and "close" part.  How can I get Eudora to
  1501. >>>save the message (not queue it) and close the window?
  1502. >
  1503. >>When you say "save", do you mean save to a disk file (try Save As), or sav
  1504. >>to the out box, but don't send (queue: never)?
  1505. >
  1506. >Allan,
  1507. >
  1508. >I mean to save the newly created message to the out box, so I can address
  1509. >it, add comments, and send it later.
  1510.  
  1511.  
  1512. This should work, but it doesn't:
  1513.  
  1514. tell application "Eudora"
  1515.         activate
  1516.         set x to make message InsertHere (end of mailbox "Out" of mail
  1517. folder "")
  1518.         set field "To" of x to "allan_marcus@lanl.gov"
  1519.         set field "Subject" of x to "Subject"
  1520.         set field "" of x to "Body-of-message"
  1521.         queue x QueueType 2
  1522. end tell
  1523.  
  1524. If I use "queue x QueueType 1" it does work.  The dictionary says:
  1525.  
  1526.         queue  message  -- The message to queue.
  1527.                 [QueueType  small integer]  -- Now 0, Next 1, Later 2, Never 3.
  1528.                 [When  integer]  -- When to send message, seconds (local time).
  1529.  
  1530. Are 2 and 3 support yet?
  1531.  
  1532. Thanks,
  1533.  
  1534. Allan
  1535.  
  1536. ---------------------------------------
  1537. Allan Marcus
  1538. Los Alamos National Laboratory
  1539. "My opinions are my own, I think..."
  1540.  
  1541. Voice: 505-665-1828
  1542. CIS: 76666,2113
  1543. AppleLink: Allan.Marcus
  1544. e-world/NewtonMail: Allan.M
  1545. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  1546. ---------------------------------------
  1547. =========================================================================
  1548. Date:         Wed, 6 Apr 1994 10:55:21 -0500
  1549. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1550. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1551. From:         Steve Dorner <sdorner@QUALCOMM.COM>
  1552. Subject:      Re: Eudora Script (save & close)
  1553.  
  1554. At 10:42 AM, Allan Marcus wrote:
  1555. >This should work, but it doesn't:
  1556. >        queue x QueueType 2
  1557.  
  1558. You haven't specified the "when" parameter, which is required for a type of
  1559. later.
  1560.  
  1561.  
  1562. >        queue  message  -- The message to queue.
  1563. >    the front before calling MacPPP Control. Opening MacPPP works fine,
  1564. it's closing it that causes the problem.
  1565.  
  1566. --- Brian
  1567. =========================================================================
  1568. Date:         Wed, 6 Apr 1994 14:24:34 -0500
  1569. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1570. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1571. From:         David Myers <myers@ACEC.COM>
  1572. Subject:      Re: Does Frontier allow custom error handling routines?
  1573.  
  1574. >Yes...starting with Frontier 2.0, the try...else... construct was added.
  1575. >
  1576. >    try
  1577. >        some statements which might produce an error
  1578. >    else
  1579. >        do something about the error.
  1580. >
  1581. >   Within the else part, the text that would have been in the Error Info
  1582. >window is available in the special variable tryError.
  1583. >
  1584. >--John
  1585.  
  1586.  
  1587. The *try* verb???  Sheesh...I never would have thought to look up that name
  1588. in the DocServer.  Apologies for my lame question.  But in self defense, I
  1589. would point
  1590. out that there *ought* to be an index listing under "Error Recovery" or
  1591. something
  1592. like that...:-)
  1593.  
  1594. Thanks to David Lewis for answering as well.
  1595. =========================================================================
  1596. Date:         Wed, 6 Apr 1994 14:57:00 -0400
  1597. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1598. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1599. From:         "peter (p.s.) wilson" <peterw@BNR.CA>
  1600. Subject:      Sequential execution with Frontier Runtime
  1601.  
  1602. Hi,
  1603.  
  1604. I'm writing a number of Installer scripts in Frontier.
  1605.  
  1606. I want to allow customers to select 2 or more scripts and
  1607. launch/run them with Frontier Runtime. This works but the
  1608. scripts do not run sequentially since Apple's Thread Manager
  1609. is loaded. Concurrent execution causes collisions on certain
  1610. control files.
  1611.  
  1612. Frontier.enableAgents (false)  seemed like the answer to limit
  1613. processing to a single script thread but Runtime does not
  1614. support this procedure... sigh.
  1615.  
  1616. Is there another technique or simple solution that would
  1617. allow me to restrict processing to a single script until that
  1618. script is complete?
  1619.  
  1620. Regards,
  1621.  
  1622. Peter Wilson
  1623. Software Support, BNR Ottawa.
  1624. peterw@bnr.ca
  1625. =========================================================================
  1626. Date:         Wed, 6 Apr 1994 12:58:25 -0700
  1627. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1628. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1629. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  1630. Subject:      Re: MacPPP OSAX under Frontier's FinderMenu
  1631.  
  1632. >Ok, I've gotten a good copy of MacPPP Control. I've installed it into
  1633. >Frontier using the Load OSAX droplet. The script fragment
  1634. >
  1635. >        if PPPOpened () {
  1636. >            closePPP ()
  1637. >            }
  1638. >
  1639. >works fine if executed from Frontier (placed into a script which is
  1640. >executed from the Quick Script window). If called from FinderMenu, however,
  1641. >it will hang the machine if the closePPP () clause is executed.
  1642.  
  1643. Hi, David...I couldn't find your message in my archives, because I had left
  1644. it in the Eudora In box for attention <sigh!>.
  1645.  
  1646. That is an interesting freeze...it appears to be looping in this code:
  1647.  
  1648.      +000C  0014F972   JSR        fsm_close
  1649.      +0010  0014F976   ADDQ.L     #$4,A7
  1650.      +0012  0014F978   BRA.S      PPPClose+0016
  1651.      +0014  0014F97A   _SystemTask
  1652.      +0016  0014F97C   MOVEA.L    $0008(A6),A0
  1653.      +001A  0014F980  *TST.B      $29FC(A0)
  1654.      +001E  0014F984   BNE.S      PPPClose+0014
  1655.      +0020  0014F986   UNLK       A6
  1656.      +0022  0014F988   RTS
  1657.  
  1658. which is strange...one would have expected that the _SystemTask would let
  1659. whatever needs to happen to change 8(A6) happen (presumably, asynchonous
  1660. completion of a call, clearing a flag).  But...there is the Runtime window
  1661. in front (at least, when I include a frontier.bringToFront ()), with a
  1662. pending update event.  Not the problem...it freezes with the Runtime window
  1663. closed, too.  Hmmm.
  1664.  
  1665. I even went to the length of doing this:
  1666.  
  1667. misc.doScript ('LAND', "macPPPControl.closePPP ()")
  1668.  
  1669. in the shared script, which still froze.  That made very sure that Runtime
  1670. was the application whose world was being used.
  1671.  
  1672. --
  1673. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  1674. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  1675. =========================================================================
  1676. Date:         Wed, 6 Apr 1994 17:38:50 -0500
  1677. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1678. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1679. From:         Steve Dorner <sdorner@QUALCOMM.COM>
  1680. Subject:      Scripting Eudora
  1681.  
  1682. I hear there's been some discussion on this list about scripting Eudora.
  1683.  
  1684. I have started a scripts directory on our ftp site (ftp.qualcomm.com,
  1685. quest/mac/eudora/scripts).  Right now, the only things there are a Frontier
  1686. install file and a very simple AppleScript.  It will be expanded as I have
  1687. time.  I will consider submitted scripts (mail them to me), but I'm not
  1688. going to put anything out there unless I understand exactly what it does.
  1689. Don't submit scripts without source; that's a risk I can't take, for
  1690. obvious reasons.  Also, if you send me a script, please indicate whether or
  1691. not we have your permission to put the script on the ftp site; when in
  1692. doubt, I won't.
  1693.  
  1694. Eudora's Apple Event support is in its infancy.  There are lots of things
  1695. that it ought to be able to do but can't, and it is very picky about a lot
  1696. of things that it should be more flexible about.  The 'aete' was composed
  1697. with very little understanding of what a proper 'aete' should be.  There
  1698. are even a few (gasp) bugs.  All I can say is that this stuff is hard to
  1699. get right and complete the first time, especially with so few examples out
  1700. there and so much else to do.
  1701.  
  1702. My general strategy is to expand the scripting slowly, starting with
  1703. whatever scriptors are most interested in.  (That's been going on for quite
  1704. some time, actually; the improvements in .1 and .2 have been user-driven.)
  1705. But I'd really like to hear from you on what you want most.
  1706.  
  1707. Alas, I don't have the time to read this list, but if you have
  1708. questions/suggestions, you know where to find me.
  1709.  
  1710. --
  1711. Steve Dorner, Qualcomm Incorporated
  1712.  "There's nothing wrong with you that can't be cured
  1713.   with a little Prozac and a polo mallet." - Woody Allen
  1714. =========================================================================
  1715. Date:         Wed, 6 Apr 1994 20:40:45 -0600
  1716. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1717. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1718. From:         Charles Wiltgen <cwiltgen@MCS.COM>
  1719. Subject:      Re: Scripting Eudora
  1720.  
  1721. >I have started a scripts directory on our ftp site (ftp.qualcomm.com,
  1722. >quest/mac/eudora/scripts).
  1723.  
  1724. Great news!
  1725.  
  1726.  
  1727. --
  1728. Charles Wiltgen
  1729. MCSnet/Chicago
  1730. cwiltgen@mcs.net
  1731. =========================================================================
  1732. Date:         Tue, 5 Apr 1994 15:06:43 PDT
  1733. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1734. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1735. From:         network_manager@ALDUS.COM
  1736. Organization: Aldus Corporation, Seattle, WA
  1737. Subject:      NDN:MacPPP control source
  1738.  
  1739. Your mail to the Microsoft Mail Server could not be fully
  1740. delivered!   No Valid Addresses!   It has been deleted.
  1741.  
  1742. Error List:
  1743.   Bad 'To:' Address: David Rogers,Eng@Sea12
  1744. =========================================================================
  1745. Date:         Wed, 6 Apr 1994 21:47:34 -0700
  1746. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1747. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1748. From:         Scott Gruby <Scott_Gruby@HMC.EDU>
  1749. Subject:      Concatenating text
  1750.  
  1751. I am looking for a way to put two strings together in AppleScript.
  1752. Basically I have information in one variable called theRecipient and
  1753. information in another variable called theMessage:
  1754.  
  1755. theRecipient: Scott_Gruby@hmc.edu
  1756. theMessage: testing...
  1757.  
  1758. I want theText to contain:
  1759. To: Scott_Gruby@hmc.edu
  1760. testing...
  1761.  
  1762. Is there an easy way to do this in AS? I have looked at some other scripts
  1763. but haven't been able to find anything.
  1764.  
  1765. Thanks.
  1766.  
  1767. Scott_Gruby@hmc.edu
  1768. =========================================================================
  1769. Date:         Wed, 6 Apr 1994 23:19:21 -0700
  1770. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1771. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1772. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  1773. Subject:      Re: Concatenating text
  1774.  
  1775. >I am looking for a way to put two strings together in AppleScript.
  1776. >Basically I have information in one variable called theRecipient and
  1777. >information in another variable called theMessage:
  1778. >
  1779. >theRecipient: Scott_Gruby@hmc.edu
  1780. >theMessage: testing...
  1781. >
  1782. >I want theText to contain:
  1783. >To: Scott_Gruby@hmc.edu
  1784. >testing...
  1785. >
  1786. >Is there an easy way to do this in AS? I have looked at some other scripts
  1787. >but haven't been able to find anything.
  1788.  
  1789. set theRecipient to "Scott_Gruby@hmc.edu"
  1790. set theMessage to "testing..."
  1791. set theText to theRecipient & return & theMessage
  1792. theText
  1793.  
  1794. produces
  1795.  
  1796. "Scott_Gruby@hmc.edu
  1797. testing..."
  1798.  
  1799. in the result window.  [When in doubt, think HyperCard.  You'll be close.]
  1800.  
  1801. --
  1802. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  1803. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  1804. =========================================================================
  1805. Date:         Thu, 7 Apr 1994 01:17:11 -0700
  1806. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1807. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1808. From:         Jon Pugh <jonpugh@NETCOM.COM>
  1809. Subject:      Re: Quit handlers
  1810.  
  1811. >As far as getting your stay-open script to quit - that sounds like an error
  1812. >in the quit handler to me.  I had the same problem.  The script will
  1813. >compile fine, but will encounter a run-time error before it hits the
  1814. >continue statement, not report the error, abort the quit handler, and just
  1815. >stay open.  It's pretty annoying, and it took me a while to figure this one
  1816. >out.
  1817.  
  1818. If this happens to you, use shift-cmd-Q key to skip the quit handler.
  1819.  
  1820. Jon
  1821. =========================================================================
  1822. Date:         Thu, 7 Apr 1994 01:17:20 -0700
  1823. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1824. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1825. From:         Jon Pugh <jonpugh@NETCOM.COM>
  1826. Subject:      Re: Eudora 1.4.1
  1827.  
  1828. >I recently converted from 1.4.1 to 1.4.2 and now some of my AppleScripts
  1829. >for Eudora don't seem to work.  In particular, I'm trying to set a
  1830. >message's status to READ from UNREAD once I've processed it.
  1831. >I seem to have used a command "SetData..." in 1.4.1 but it seems to have
  1832. >changed as my scripts won't compile.
  1833.  
  1834. Eudora 1.4.1 used nonstandard GetData & SetData events.  They were removed
  1835. in 1.4.2 in favor of the standard and implicit get and the explicit set
  1836. command.  Typically you can simply remove the GetData and change SetData to
  1837. simply set.
  1838.  
  1839. Jon
  1840. =========================================================================
  1841. Date:         Thu, 7 Apr 1994 04:48:39 -0500
  1842. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1843. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1844. From:         Cepol <abduls@RPI.EDU>
  1845. Subject:      Eudora 1.4.2 & Set
  1846.  
  1847. Hai there,
  1848.         I'm trying to script eudora to redirect some mail to my other
  1849. account. However, I did't want to keep any copy of the massage that I
  1850. redirect. My default is keep message. Here is my script
  1851.  
  1852. redirect message 1 of mailbox "In" of mail folder ""
  1853. set field "To" of message "" to "abduls@mts.rpi.edu"
  1854. set KeepCopy of message "" to false
  1855.  
  1856. This script work fine, but Eudora still keep a copy of the mail that being
  1857. redirect. Then I did the following test
  1858.  
  1859.      1) If I made my default to not keep copy, and do the following script
  1860.  
  1861.                 set KeepCopy of message "" to true
  1862.  
  1863.         The script do what it should do (i.e eudora will set KeepCopy to TRUE).
  1864.  
  1865.  
  1866.      2) If I made my default to not keep copy, and do the following script
  1867.  
  1868.         set KeepCopy of message "" to false
  1869.  
  1870.         Eudora will set KeepCopy to TRUE, which it shouldn't do.
  1871.  
  1872.  
  1873. Could someone help me on this, or confirm me that this is a bug in Eudora.
  1874.  
  1875.  
  1876. ----------------------------------------------------------------------------
  1877. SAIFUL AZUAN ABDUL AZIZ RENSSELAER POLYTECHNIC INSTITUTE TROY NEW YORK 12180
  1878.          INTERNET:abduls@rpi.edu AOL: AZRIN PHONE:518-273-0549
  1879.        US-MAIL:1004 PEOPLES AVENUE, 2nd FLOOR, TROY, NEW YORK 12180
  1880. DISCLAIMER:WHAT SHOULD I SAY OVER HERE? I DON'T KNOW. CAN YOU FIGURE IT OUT?
  1881. ----------------------------------------------------------------------------
  1882. =========================================================================
  1883. Date:         Thu, 7 Apr 1994 11:16:00 -0500
  1884. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1885. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1886. From:         Igor Livshits <igorl@UIUC.EDU>
  1887. Subject:      Get current Eudora selection
  1888.  
  1889. Howdy,
  1890.  
  1891. I am looking for a code snippet that gets a current Eudora selection (text
  1892. selected in the body of the current message, e.g.). If someone has done
  1893. this, could you please enlighten me?
  1894.  
  1895. Thanks, Igor
  1896.  
  1897. _____
  1898. =========================================================================
  1899. Date:         Thu, 7 Apr 1994 14:55:32 -0500
  1900. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1901. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1902. From:         Igor Livshits <igorl@UIUC.EDU>
  1903. Subject:      Get current Eudora selection
  1904.  
  1905. Howdy,
  1906.  
  1907. Earlier today I asked:
  1908. >I am looking for a code snippet that gets a current Eudora selection (text
  1909. >>selected in the body of the current message, e.g.). If someone has done this,
  1910. >>could you please enlighten me?
  1911.  
  1912. Unfortunately, Steve Dorner replied:
  1913. >Can't be done.
  1914. >
  1915. >--
  1916. >Steve Dorner, Qualcomm Incorporated
  1917.  
  1918. Bummer, there goes my brilliant idea of selecting an URL, pulling down a
  1919. menu, and having Anarchie fetch it in the background :(
  1920.  
  1921. Igor
  1922.  
  1923. _____
  1924. =========================================================================
  1925. Date:         Thu, 7 Apr 1994 14:30:37 -0700
  1926. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1927. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1928. From:         David Ray <daver@NETCOM.COM>
  1929. Subject:      Re: Get current Eudora selection
  1930.  
  1931. Igor Livshits <igorl@UIUC.EDU> wrote:
  1932. >>I am looking for a code snippet that gets a current Eudora selection (text
  1933. >>selected in the body of the current message, e.g.). If someone has done this,
  1934. >>could you please enlighten me?
  1935.  
  1936. Steve Dorner replied:
  1937. >Can't be done.
  1938.  
  1939. There may be a way to to do this, using the MenuEvents extension or with
  1940. the AutoType osax.
  1941.  
  1942. The MenuEvents
  1943. extension adds Applescript functionality by allowing you to use any
  1944. menu item in an application that is apple event aware, even if that
  1945. menu item isn't in the scripting suite. You should be able to specify
  1946. in a script something like "item 3 of menu 2" corresponding to Copy.
  1947. Then go to the other application, and specify "item 4 of menu 2"
  1948. (or whatever it is) to paste the data into the other app.
  1949.  
  1950. You could also do this with AutoType osax if the Copy and Paste have
  1951. command keys (which they usually do in most apps). Highlight the text
  1952. you want, then have a section in your script with:
  1953.  
  1954. Autotype "c" holding "command" -- this will copy the highlighted text
  1955. tell app "whatever" to activate
  1956. Autotype "v" holding "command" -- this will paste the clipboard
  1957.  
  1958. Let me know if this works.
  1959.  
  1960. -Dave
  1961. daver@netcom.com
  1962. =========================================================================
  1963. Date:         Thu, 7 Apr 1994 15:38:50 MDT
  1964. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1965. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1966. From:         Mel Walker <Mel_Walker@NOVELL.COM>
  1967. Subject:      MacHack - information wanted
  1968.  
  1969. Field-1:
  1970. Can anyone send me some information about this year's MacHack, or point me to a
  1971.  source? Thanks. BTW, how many people usually attend?
  1972. --Mel Walker
  1973. mwalker@novell.com
  1974.  
  1975.  
  1976. ---Begin attached file "QMFORM.FRM".Z---
  1977.  
  1978. begin 666 "QMFORM.FRM".Z
  1979. M'YV048Q(:1*E"9(I ,@H*&CDR4 7 IN$T(    MH8 !8> 0O0+T8':?Q @4@
  1980. MA#8?  0 D+&RR90C10#(G$FSILT  '#BM,FSIJ8F$7L*I:DSYU"A:!H.Y&GC
  1981. M:-.B1X4VG1E 1(!X*0&(F:DG0#L !68. , @ *":?&0&\' 5[$P" !( <&$4
  1982. M0!(S5+;:9'&4+]2H//F2.="DCIP60>#  4!!01,H4)P@.2($2I D )C,F;.3
  1983. (*H '0R+4E0F4
  1984.  
  1985. end
  1986.  
  1987. ---End attached file "QMFORM.FRM".Z---
  1988. =========================================================================
  1989. Date:         Thu, 7 Apr 1994 17:46:16 -0500
  1990. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1991. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1992. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  1993. Subject:      FrontMost Crash
  1994.  
  1995. Hello,
  1996.  
  1997.  I am writing a simple test client-server system where the client is a an
  1998. AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
  1999. app.  The problem I am having is that when the FaceSpan command "make new
  2000. listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes  )
  2001. or drops down into MacsBug. It is not consistent.
  2002.  
  2003.  I have tried all kinds of things:
  2004.  
  2005.     I am only using the extensions I need.
  2006.     I have tried  saving the FaceSpan app as a complete app or a mini app.
  2007.     I wrapped a try-error handler around the troublemaker line.
  2008.  
  2009. When I call the "AddFile"  handler from within the Server app itself it
  2010. works fine, but when I call the handler from a client script,  I get the
  2011. hang.
  2012.  
  2013.  I don't know what to try next.  Anybody out there experience this type of
  2014. problem? I have not seen too much discussion of FrontMost on this list. I
  2015. hope it is OK to ask this type of question here.
  2016.  
  2017. ========
  2018.  
  2019. Here are the scripts that make up the system. I cut out all the other
  2020. stuff. This code still bombs. By the way I am running System 7 Pro on an
  2021. fx.
  2022.  
  2023.  Thanks.
  2024.  
  2025.  
  2026. Client Script
  2027. -----------------
  2028. tell application "Server"
  2029.         activate
  2030.         AddFile("junk")
  2031.         activate current application
  2032. end tell
  2033.  
  2034.  
  2035. "Server Script" in FrontMost Project Script
  2036. ---------------------------------------------------------
  2037. on AddFile(theFile)
  2038.       open window "Files To Get"
  2039.       set theListBox to listbox "File List" of window "Files To Get"
  2040.      -- I have a valid reference here. I checked using display dialog.
  2041.       make new listbox item at end of theListBox with properties
  2042. {contents:"junk"}
  2043. end AddFile
  2044.  
  2045. --
  2046. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2047. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2048. sshws@convx1.lerc.nasa.gov
  2049. AppleLink: SCHILLING.H
  2050. =========================================================================
  2051. Date:         Thu, 7 Apr 1994 19:46:21 -0500
  2052. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2053. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2054. From:         Chris Brannon <cbrannon+@PITT.EDU>
  2055. Subject:      Re: Eudora script (save & close)
  2056.  
  2057. >You made a message at the end of the "Out" mailbox.  Don't you just use the
  2058. >same reference?  Alternatively, try using the reference:
  2059. >
  2060. >   message 1
  2061.  
  2062. A reasonable suggestion, but "save message 1" generates an error (Eudora
  2063. doesn't understand).  "save message" doesn't work either.
  2064.  
  2065. Very frustrating....
  2066.  
  2067. Chris
  2068. =========================================================================
  2069. Date:         Fri, 8 Apr 1994 16:28:31 +0100
  2070. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2071. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2072. From:         Johan Solve <johan.solve@ITN.HH.SE>
  2073. Subject:      Re: Get current Eudora selection
  2074.  
  2075. > Howdy,
  2076. >
  2077. > Earlier today I asked:
  2078. > >I am looking for a code snippet that gets a current Eudora selection (text
  2079. > >>selected in the body of the current message, e.g.). If someone has done
  2080. >this,
  2081. > >>could you please enlighten me?
  2082. >
  2083. > Unfortunately, Steve Dorner replied:
  2084. > >Can't be done.
  2085. > >
  2086. > >--
  2087. > >Steve Dorner, Qualcomm Incorporated
  2088. >
  2089. > Bummer, there goes my brilliant idea of selecting an URL, pulling down a
  2090. > menu, and having Anarchie fetch it in the background :(
  2091. >
  2092. > Igor
  2093.  
  2094. Can't you just make a "copy" from the Edit menu? Isn't there an osax to
  2095. force any application to make a copy?
  2096.  
  2097. BTW, I made a script that takes a file list from the clipboard (previously
  2098. copied from info-mac digest with EasyView, manually at this state) and
  2099. tells Anarchie to download all those files. It hangs sometimes, for some
  2100. unknown reason, and it doesn't handle file not found-cases. It uses some
  2101. osaxen (clipboard and switch to launcher).
  2102. I enclose the script, if anyone finds it interesting. Comments are welcome.
  2103.  
  2104.  
  2105. set filelist to the clipboard
  2106. if filelist begins with "info-mac" then
  2107.     with timeout of 60 * 60 seconds
  2108.         tell application "Anarchie" to activate
  2109.         switch to launcher
  2110.         set site to "ftp.sunet.se:/pub/mac/" -- my local mirror
  2111.         repeat with i from 1 to the number of paragraphs of filelist
  2112.             set currentfile to paragraph i of filelist
  2113.             if currentfile is not "" then
  2114.                 set filetoget to site & paragraph i of filelist
  2115.                 tell application "Anarchie" to fetch url filetoget
  2116.             end if
  2117.         end repeat
  2118.     end timeout
  2119. else
  2120.     beep
  2121. end if
  2122.  
  2123. _______________________________________________________________________
  2124.           "
  2125.    JOHAN SOLVE                   Department of Science and Technology
  2126.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  2127. =========================================================================
  2128. Date:         Fri, 8 Apr 1994 10:24:42 -0600
  2129. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2130. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2131. From:         Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
  2132. Subject:      Mystery AppleEvents and AE Registry ???
  2133.  
  2134. I recently added a wildcard handler for AppleEvents to my application, and
  2135. all sorts of strange events started showing up. First, does anyone have any
  2136. clue what the following events are, and where they might be documented?
  2137. (They all are received in response to an OSADoScript call in my
  2138. application)
  2139.  
  2140. AppleEvent Class = ascr, ID = gdut
  2141. AppleEvent Class = syso, ID = ntoc
  2142. AppleEvent Class = misc, ID = curd
  2143. AppleEvent Class = ears, ID = lfdr
  2144.  
  2145. Second, is there a more recent copy of the AppleEvents Registry than the
  2146. Winter 1992 issue? That's all I found on the most recent dev. CD, and it
  2147. seems pretty out of date.
  2148.  
  2149. (If possible, please cc: me directly on any responses. I'm only receiving
  2150. digests of this list right now.)
  2151.  
  2152. --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  2153. Chuck Shotton                             \
  2154. Assistant Director, Academic Computing     \   "Shut up and eat your
  2155. U. of Texas Health Science Center Houston   \    vegetables!!!"
  2156. cshotton@oac.hsc.uth.tmc.edu  (713) 794-5650 \
  2157. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
  2158. =========================================================================
  2159. Date:         Fri, 8 Apr 1994 10:29:28 -0800
  2160. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2161. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2162. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  2163. Subject:      Re: FrontMost Crash
  2164.  
  2165. 1. What is FaceSpan? If you are running early FrontMost code I'd recommend
  2166. you get the latest FrontMost. Why troubleshoot an environment that no one
  2167. else is using?
  2168.  
  2169. 2. Your line of code "make new listbox item at end of theListBox with
  2170. properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2171. not by any means a FrontMost expert but I do not see how this code is
  2172. supposed to know what to do. What is "end of theListBox"? I'd say start
  2173. small by making a listbox item in code. Then gradually define all it's
  2174. properties. THEN, use it in your application.
  2175.  
  2176.  
  2177. >"Server Script" in FrontMost Project Script
  2178. >---------------------------------------------------------
  2179. >on AddFile(theFile)
  2180. >      open window "Files To Get"
  2181. >      set theListBox to listbox "File List" of window "Files To Get"
  2182. >     -- I have a valid reference here. I checked using display dialog.
  2183. >      make new listbox item at end of theListBox with properties
  2184. >{contents:"junk"}
  2185. >end AddFile
  2186.  
  2187.  
  2188. Kee Nethery
  2189.  
  2190. _________________________________________________________________
  2191. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  2192. =========================================================================
  2193. Date:         Fri, 8 Apr 1994 14:46:02 -0400
  2194. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2195. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2196. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  2197. Subject:      Re: FrontMost Crash
  2198. In-Reply-To:  <no.id> from "Kee Nethery +1 510 843 6140" at Apr 8,
  2199.               94 10:29:28 am
  2200.  
  2201. --Kee Nethery wrote:
  2202. >
  2203. >1. What is FaceSpan?
  2204.  
  2205.     FaceSpan is the new name for Frontmost. The compnay that actually
  2206. makes Frontmost is going to be marketing the product themselves,
  2207. starting with the new version. To differentiate their product from the
  2208. one bundled with AppleScript they have changed the name to FaceSpan.
  2209. Personally, I think the new name sucks, and judging by the discussions
  2210. on AppleLink, so does just about everyone else.
  2211.  
  2212. >If you are running early FrontMost code I'd recommend you get the latest
  2213. >FrontMost. Why troubleshoot an environment that no one else is using?
  2214.  
  2215.     Well, there really weren't any changes from the beta Frontmost, to
  2216. the release version. The release version is more stable, but all of the
  2217. code should be exactly the same.
  2218.  
  2219. >2. Your line of code "make new listbox item at end of theListBox with
  2220. >properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2221. >not by any means a FrontMost expert but I do not see how this code is
  2222. >supposed to know what to do.
  2223.  
  2224.     I will preface this by saying that I don't know why Frontmost isn't
  2225. working for the original poster, however, this particular statement is
  2226. quite correct. It is possible to create window items using Frontmost
  2227. code.
  2228.  
  2229. >What is "end of theListBox"?
  2230.  
  2231.     This is the location for the new item to be created. Whenever you
  2232. call the make command you must specify a destination, this is the same
  2233. for the duplicate command and the move command.
  2234.  
  2235. >I'd say start small by making a listbox item in code. Then gradually
  2236. >define all it's properties. THEN, use it in your application.
  2237.  
  2238.     First of all, he is making the listbox item in code, that's the
  2239. whole point of this script. Second, according to the syntax of the call
  2240. you are supposed to define all non-default properties at the time of the
  2241. creation.
  2242.  
  2243. >>"Server Script" in FrontMost Project Script
  2244. >>---------------------------------------------------------
  2245. >>on AddFile(theFile)
  2246. >>      open window "Files To Get"
  2247. >>      set theListBox to listbox "File List" of window "Files To Get"
  2248. >>     -- I have a valid reference here. I checked using display dialog.
  2249. >>      make new listbox item at end of theListBox with properties
  2250. >>{contents:"junk"}
  2251. >>end AddFile
  2252.  
  2253.     My one gripe with this script is the original poster doesn't appear
  2254. to be using the subroutine parameter theFile. He might also need to set
  2255. theListBox to a reference to the listbox, rather than the listbox
  2256. itself.
  2257.  
  2258. -Hades
  2259. =========================================================================
  2260. Date:         Fri, 8 Apr 1994 16:11:06 -0500
  2261. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2262. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2263. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  2264. Subject:      Re: FrontMost Crash
  2265.  
  2266. >1. What is FaceSpan?
  2267.  
  2268. It is the new name for FrontMost. I don't know why they changed it.
  2269.  
  2270. >If you are running early FrontMost code I'd recommend
  2271. >you get the latest FrontMost. Why troubleshoot an environment that no one
  2272. >else is using?
  2273.  
  2274. I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
  2275. If there is a newer version out there I would like to know about it.
  2276.  
  2277. >
  2278. >2. Your line of code "make new listbox item at end of theListBox with
  2279. >properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2280. >not by any means a FrontMost expert but I do not see how this code is
  2281. >supposed to know what to do. What is "end of theListBox"?
  2282.  
  2283. "end of theListBox" is relative reference form telling FrontMost where to
  2284. put the new listbox item I just made. I know this is good code, because
  2285. when I call this handler from inside the app that has the handler it works
  2286. fine.
  2287.  
  2288. > I'd say start
  2289. >small by making a listbox item in code. Then gradually define all it's
  2290. >properties. THEN, use it in your application.
  2291. >
  2292.  
  2293. I tried doing it without defining any properties but it did not help.
  2294.  
  2295. Thanks for the reply. I am still stumped.
  2296.  
  2297. --
  2298. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2299. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2300. sshws@convx1.lerc.nasa.gov
  2301. AppleLink: SCHILLING.H
  2302. =========================================================================
  2303. Date:         Fri, 8 Apr 1994 16:31:18 -0500
  2304. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2305. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2306. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  2307. Subject:      Re: FrontMost Crash
  2308.  
  2309. ...
  2310. Stuff deleted from Brian V. Hughes reply. I agree with Brian on everything,
  2311. including the lousy new name for FaceSpan.
  2312. ...
  2313.  
  2314.  
  2315. >Brian V. Hughes wrote:
  2316. >
  2317. >    My one gripe with this script is the original poster doesn't appear
  2318. >to be using the subroutine parameter theFile. He might also need to set
  2319. >theListBox to a reference to the listbox, rather than the listbox
  2320. >itself.
  2321. >
  2322.  
  2323. The reason I did not use "the subroutine parameter theFile" is because in
  2324. my original full script I did use it. I stripped out a lot of stuff to try
  2325. to narrow down the problem. I guess I should have gotten rid of the
  2326. parameter also. I will try it even though I don't see why it should cause a
  2327. problem. I will have to think about the reference business. Thanks for the
  2328. suggestions, Brian.
  2329.  
  2330. --
  2331. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2332. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2333. sshws@convx1.lerc.nasa.gov
  2334. AppleLink: SCHILLING.H
  2335. =========================================================================
  2336. Date:         Fri, 8 Apr 1994 15:15:53 -0800
  2337. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2338. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2339. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  2340. Subject:      Re: FrontMost Crash
  2341.  
  2342. Sorry I was unable to offer any useful suggestions. AppleScript seems
  2343. extremely useful but boy the debugging tools and applications are a long
  2344. ways from making this easy. Good luck.
  2345. Kee
  2346.  
  2347. >>1. What is FaceSpan?
  2348. >
  2349. >It is the new name for FrontMost. I don't know why they changed it.
  2350. >
  2351. >>If you are running early FrontMost code I'd recommend
  2352. >>you get the latest FrontMost. Why troubleshoot an environment that no one
  2353. >>else is using?
  2354. >
  2355. >I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
  2356. >If there is a newer version out there I would like to know about it.
  2357. >
  2358. >>
  2359. >>2. Your line of code "make new listbox item at end of theListBox with
  2360. >>properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2361. >>not by any means a FrontMost expert but I do not see how this code is
  2362. >>supposed to know what to do. What is "end of theListBox"?
  2363. >
  2364. >"end of theListBox" is relative reference form telling FrontMost where to
  2365. >put the new listbox item I just made. I know this is good code, because
  2366. >when I call this handler from inside the app that has the handler it works
  2367. >fine.
  2368. >
  2369. >> I'd say start
  2370. >>small by making a listbox item in code. Then gradually define all it's
  2371. >>properties. THEN, use it in your application.
  2372. >>
  2373. >
  2374. >I tried doing it without defining any properties but it did not help.
  2375. >
  2376. >Thanks for the reply. I am still stumped.
  2377. >
  2378. >--
  2379. >Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2380. >Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
  2381. >sshws@convx1.lerc.nasa.gov
  2382. >AppleLink: SCHILLING.H
  2383.  
  2384. _________________________________________________________________
  2385. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  2386. =========================================================================
  2387. Date:         Fri, 8 Apr 1994 17:04:02 -0700
  2388. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2389. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2390. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2391. Subject:      Re: Mystery AppleEvents and AE Registry ???
  2392.  
  2393. >Second, is there a more recent copy of the AppleEvents Registry than the
  2394. >Winter 1992 issue? That's all I found on the most recent dev. CD, and it
  2395. >seems pretty out of date.
  2396.  
  2397. Chuck,
  2398.    I don't know of a whole new registry.  There is an list of errata to the
  2399. Winter '92 registry (also on the CDs, I think), and a small erratum to the
  2400. errata (but nothing erotic).
  2401.  
  2402.    There have been new suites defined, and registry sections for those are
  2403. here and there on the CDs:  Word Services, Telephony, Table (I think new
  2404. since Winter '92), etc.  And more are in the works.
  2405.  
  2406.  
  2407. If I don't see answers flow by regarding the events you ask about, I'll try
  2408. to find out what they are.
  2409.  
  2410.    'ascr' suggests AppleScript...that's the AppleScript suite.  'syso' is a
  2411. sort of catch-all, which many of the AppleScript Scripting Additions use
  2412. when nothing else fits ("system operation" or something).  'misc' 'curd' is
  2413. old milk <sorry>.
  2414.  
  2415.  
  2416. --
  2417. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  2418. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  2419. =========================================================================
  2420. Date:         Sat, 9 Apr 1994 02:00:26 -0700
  2421. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2422. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2423. From:         Jon Pugh <jonpugh@NETCOM.COM>
  2424. Subject:      Re: FaceSpam
  2425.  
  2426. >It is the new name for FrontMost. I don't know why they changed it.
  2427.  
  2428. The rumor I heard is that the Frontier people thought that the Frontmost
  2429. name was too close for comfort and complained.  Go figure.
  2430.  
  2431. Jon
  2432. =========================================================================
  2433. Date:         Sat, 9 Apr 1994 02:00:23 -0700
  2434. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2435. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2436. From:         Jon Pugh <jonpugh@NETCOM.COM>
  2437. Subject:      Re: Unknown Events
  2438.  
  2439. >AppleEvent Class = ascr, ID = gdut
  2440.  
  2441. GetData User Terminology.  This is the event AppleScript sends to get your
  2442. aete resource.  If an app isn't running it simply opens the app and does a
  2443. GetResource.  If it is open, then it sends this event.  Most apps don't
  2444. handle it and thus AppleScript's system event handler does.  It calls
  2445. GetResource and returns the resource.  Kind of slick.
  2446.  
  2447. These three are all standard scripting additions:
  2448.  
  2449. >AppleEvent Class = syso, ID = ntoc
  2450.  
  2451.         ASCII character (String Commands)
  2452.  
  2453. >AppleEvent Class = misc, ID = curd
  2454.  
  2455.         current date (Current Date)
  2456.  
  2457. >AppleEvent Class = ears, ID = lfdr
  2458.  
  2459.         list folder (File Commands)
  2460.  
  2461. As for the Apple Event Registry, I was the Registrar, but they decided that
  2462. that job position wasn't needed and that the Registry was complete.  I was
  2463. laid off last July.  Nothing has or will be done to the Registry.
  2464. Apparently the OpenDoc people at CIL have publicly accepted responsibility
  2465. for the Registry, although they haven't done anything with it yet either.
  2466.  
  2467. Jon
  2468. =========================================================================
  2469. Date:         Fri, 8 Apr 1994 04:41:03 LCL
  2470. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2471. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2472. From:         Rick Zeman <rick.zeman@HIS.COM>
  2473. Organization: Heller Info Services (info@his.com) Near DC
  2474. Subject:      Haunted...
  2475.  
  2476. Got a weird one here, folks:  at the end on a bunch of SITcomm AS 1.1 launch
  2477. scripts, I had a launch statement for a non-scriptable application (Rick
  2478. Holzgraffe's SignatureQuote).
  2479.  
  2480. I used an osax to see if it's running and if the result was false, I launched
  2481. it (not 'told' it).  Worked like a champ.
  2482.  
  2483. Problem is now that I'm not using a 68000 anymore, I don't need to do that
  2484. anymore (don't ask).  So I removed all of the statements from the scripts and
  2485. recompiled.  BUT THE FREAKING THING STILL LAUNCHES EVERY TIME! even though
  2486. it's not being referred to at all.
  2487.  
  2488. Even a simple script like
  2489.  
  2490. tell application "SITcomm*"
  2491.         activate
  2492.         Connect "Twilight Clone"
  2493. end tell
  2494.  
  2495. causes it to launch.
  2496.  
  2497. I'm lost.  What on earth is going on here?
  2498.  
  2499.  
  2500. _________________________________________________________ern Univ.     not to know it."
  2501.                                                     --Richard S. Wurman
  2502. E-mail: donovan@covis.nwu.edu                          "Information Anxiety"
  2503. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2504. =========================================================================
  2505. Date:         Mon, 11 Apr 1994 13:07:12 -0500
  2506. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2507. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2508. From:         Allan Marcus <allan_marcus@LANL.GOV>
  2509. Subject:      'is app running' command?
  2510.  
  2511. Is there any way that I can determine if a specific app is running (via AS)?
  2512.  
  2513. Thanks,
  2514.  
  2515.  
  2516. ---------------------------------------
  2517. Allan Marcus
  2518. Los Alamos National Laboratory
  2519. "My opinions are my own, I think..."
  2520.  
  2521. Voice: 505-665-1828
  2522. CIS: 76666,2113
  2523. AppleLink: Allan.Marcus
  2524. e-world/NewtonMail: Allan.M
  2525. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  2526. ---------------------------------------
  2527. =========================================================================
  2528. Date:         Mon, 11 Apr 1994 13:34:58 -0500
  2529. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2530. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2531. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  2532. Subject:      Re: 'is app running' command?
  2533.  
  2534. >Is there any way that I can determine if a specific app is running (via AS)?
  2535.  
  2536. Yes, there are two osaxen that can do this:
  2537.  
  2538. is application running, and list applications.
  2539.  
  2540. Is application running requires a string and returns boolean.
  2541.  
  2542. List applications returns a list of strings (which you can use in something
  2543. like
  2544.  
  2545. if (list applications) contains "<app to check for>"
  2546.  
  2547. )
  2548.  
  2549. King Rhoton                                             king@acpub.duke.edu
  2550. =========================================================================
  2551. Date:         Mon, 11 Apr 1994 14:47:59 -0500
  2552. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2553. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2554. From:         Allan Marcus <allan_marcus@LANL.GOV>
  2555.  
  2556. When I run the following script (copied from the scripting the finder
  2557. document that came with AS 1.1), I get a "--> Source not available." error
  2558. message after selecting the finderlib file from the dialog.  Am I doing
  2559. something wrong?
  2560.  
  2561. ---
  2562. property finderLib : "null"
  2563.  
  2564. if class of finderLib =82 script then
  2565.         set finderLib to load script (choose file with prompt =AC
  2566.                 "Where is the compiled script \"finderLib\"?" of type "osas"=
  2567. )
  2568. end if
  2569. ---
  2570.  
  2571. Thanks,
  2572.  
  2573.  
  2574. ---------------------------------------
  2575. Allan Marcus
  2576. Los Alamos National Laboratory
  2577. "My opinions are my own, I think..."
  2578.  
  2579. Voice: 505-665-1828
  2580. CIS: 76666,2113
  2581. AppleLink: Allan.Marcus
  2582. e-world/NewtonMail: Allan.M
  2583. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  2584. ---------------------------------------
  2585. =========================================================================
  2586. Date:         Mon, 11 Apr 1994 15:11:10 -0400
  2587. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2588. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2589. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  2590. Subject:      Re: 'is app running' command?
  2591. In-Reply-To:  <9404111708.AA07655@fiu.edu>
  2592.  
  2593. Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  2594. PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  2595. read Info-Mac regularly, and have copped some of the AppleEvents progs and
  2596. like the power they concede!  Is there a starter kit for Scripting that
  2597. wont put me in the red (a.k.a. Userland's Frontier)?
  2598.  
  2599. Thanx for your time.
  2600. --Luis
  2601. =========================================================================
  2602. Date:         Mon, 11 Apr 1994 15:32:17 -0400
  2603. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2604. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2605. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  2606. Subject:      Re: Script runs from ScriptEditor, not from FMPRO
  2607. In-Reply-To:  <no.id> from "Benjamin Broder" at Apr 10, 94 01:16:06 pm
  2608.  
  2609. --Benjamin Broder wrote:
  2610. >
  2611. >The script runs fine when I run it from the ScriptEditor,
  2612. >but when I run it from Filemaker Pro, nothing happens (I
  2613. >don't even get an error.)
  2614.  
  2615.     Well, there is a very simple reason nothing happens when you try to
  2616. send the "run" command to the script from FM Pro. There's nothing to
  2617. send the do script even to. I'll explain this a little better below...
  2618.  
  2619. >I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
  2620. >Applescript 1.0. I have the script working when I run
  2621. >it from the Script Editor and in FMPro I created a FMPro
  2622. >script that sends a "do script" event to my script (saved
  2623. >as an application) with the text of the script being "run()".
  2624.  
  2625.     If the script has been saved as an application, you can't send it a
  2626. do script event unless you have first sent it an open event. If the
  2627. script application isn't running there will be nothing that can receive
  2628. the event you want to send. Fortunately, all you need to do is send the
  2629. open application event to your script application from FM Pro. This is
  2630. one of the options on the event pop-up menu in FM Pro's Script Maker.
  2631. Making this change should slove your problems.
  2632.  
  2633. -Hades
  2634. =========================================================================
  2635. Date:         Mon, 11 Apr 1994 15:38:56 -0400
  2636. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2637. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2638. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  2639. Subject:      Re: 'is app running' command?
  2640. In-Reply-To:  <no.id> from "Luis Muench" at Apr 11, 94 03:11:10 pm
  2641.  
  2642. --Luis Muench wrote:
  2643. >
  2644. >Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  2645. >PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  2646. >read Info-Mac regularly, and have copped some of the AppleEvents progs and
  2647. >like the power they concede!  Is there a starter kit for Scripting that
  2648. >wont put me in the red (a.k.a. Userland's Frontier)?
  2649.  
  2650.     If you are looking for a real scripting starter's kit, there are a
  2651. couple of options for you. First of all you can buy the AppleScript
  2652. Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
  2653. with a really good set of manuals, including a pretty good Getting
  2654. Started with AppleScript guide. The other choice is to buy one of the
  2655. AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
  2656. Both of these are supposed to be good for the novice scripter. If you
  2657. have any kind of programming background, especially something like
  2658. Hypercard, picking up AppleScript is pretty easy.
  2659.  
  2660. -Hades
  2661. =========================================================================
  2662. Date:         Mon, 11 Apr 1994 15:29:53 -0500
  2663. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2664. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2665. From:         Fred Terry <pfterry@LKS.CSI.COM>
  2666. Subject:      new file on gaea
  2667.  
  2668. I have placed Allan Crump's Date Convert library on gaea in
  2669.  
  2670. ftp://applescript/scripts/DateConvert.sit.hqx
  2671.  
  2672. It converts Applescript date and date-times to Julian integers and reals
  2673. (respectively) for use in calculations where a julian date is needed.
  2674.  
  2675. Enjoy.
  2676.  
  2677. pf
  2678.  
  2679.  
  2680. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2681. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  2682. =========================================================================
  2683. Date:         Mon, 11 Apr 1994 18:51:16 -0500
  2684. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2685. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2686. From:         Allan Marcus <allan_marcus@LANL.GOV>
  2687. Subject:      Pause?
  2688.  
  2689. Anyone know how to pause a script during runtime?  Here's the situation:
  2690.  
  2691. I am sendind an FTP fetch request to Anarchie.  The file is retreived fine
  2692. via anarchie, and then anarchie launches stuffit expander to decompress.
  2693. Unfortunatley, the applescript is considered done as soon as the download
  2694. is complete, not when stuffit is done!  I figure I can do something like
  2695. this:
  2696.  
  2697. if (is application ruinning("Stuffit")) then
  2698.         pause for a few seconds
  2699. end if
  2700.  
  2701. So, how do I pause with out eating cpu time?
  2702.  
  2703. Any other ideas?
  2704.  
  2705. thanks,
  2706.  
  2707. Allan
  2708.  
  2709.  
  2710. ---------------------------------------
  2711. Allan Marcus
  2712. Los Alamos National Laboratory
  2713. "My opinions are my own, I think..."
  2714.  
  2715. Voice: 505-665-1828
  2716. CIS: 76666,2113
  2717. AppleLink: Allan.Marcus
  2718. e-world/NewtonMail: Allan.M
  2719. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  2720. ---------------------------------------
  2721. =========================================================================
  2722. Date:         Mon, 11 Apr 1994 16:50:36 -0700
  2723. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2724. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2725. From:         David Ray <daver@NETCOM.COM>
  2726. Subject:      Re: Pause?
  2727.  
  2728. Allan Marcus wrote:
  2729.  
  2730. >Anyone know how to pause a script during runtime?  Here's the situation:
  2731. >
  2732. >I am sendind an FTP fetch request to Anarchie.  The file is retreived fine
  2733. >via anarchie, and then anarchie launches stuffit expander to decompress.
  2734. >Unfortunatley, the applescript is considered done as soon as the download
  2735. >is complete, not when stuffit is done!  I figure I can do something like
  2736. >this:
  2737. >
  2738. >if (is application ruinning("Stuffit")) then
  2739. >        pause for a few seconds
  2740. >end if
  2741. >
  2742. >So, how do I pause with out eating cpu time?
  2743.  
  2744. You need to do something like the following. It requires that the script
  2745. is saved as a stay-open application so that you can use the idle..end idle
  2746. handler. This lets you define a "wait period" in seconds that the script
  2747. will wait (and not eat CPU time) before repeating the loop. It's the only
  2748. way I know of that you can pause without eating up CPU time.
  2749.  
  2750. general format:
  2751.  
  2752. global i
  2753. set i to 1
  2754. on idle
  2755.   if i = 1 then
  2756.     <do the first thing>
  2757.     set i to i + 1
  2758.   else if i = 2 then
  2759.     if <a condition is satisfied> then
  2760.       set i to i + 1
  2761.     end if
  2762.   else if i = 3 then
  2763.     <do whatever you want after condition is satisfied>
  2764.     quit
  2765.   end if
  2766.   return n -- n must be an integer representing the no. of seconds that
  2767.               the script pauses before repeating the loop
  2768. end idle
  2769.  
  2770. For your example:
  2771.  
  2772. global i
  2773. set i to 1
  2774. on idle
  2775.   if i = 1 then
  2776.     <section telling Anarchie to do stuff>
  2777.     set i to i + 1
  2778.   else if i = 2
  2779.     if (list applications) does not contain "Stuffit" then
  2780.       set i to i + 1
  2781.     end if  -- It keeps checking if Stuffit is running every 2 seconds
  2782.                and doesn't proceed until Stuffit stops running
  2783.   else if i = 3
  2784.     <whatever you want to do after Stuffit is finished>
  2785.     quit
  2786.   end if
  2787.   return 2  -- wait 2 seconds (without eating CPU time) before
  2788.             -- repeating the loop -- change to whatever idle time you like
  2789. end idle
  2790.  
  2791.  
  2792. Hope this helps
  2793.  
  2794. Dave
  2795.  
  2796. ------------------------------------------------------------------------------
  2797. David Ray                Dream Designs          Music Composition
  2798. daver@netcom.com         PO Box 5631            Interactive Multimedia
  2799. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  2800. =========================================================================
  2801. Date:         Mon, 11 Apr 1994 20:17:57 -0700
  2802. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2803. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2804. From:         William Cook <wrc@NETCOM.COM>
  2805. Subject:      Re: MACSCRPT Digest - 9 Apr 1994 to 10 Apr 1994
  2806.  
  2807. >From:    Benjamin Broder <bbroder@HSC.USC.EDU>
  2808. >Subject: Script runs from ScriptEditor, not from FMPRO
  2809. >...
  2810. >I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
  2811. >Applescript 1.0. I have the script working when I run
  2812. >it from the Script Editor and in FMPro I created a FMPro
  2813. >script that sends a "do script" event to my script (saved
  2814. >as an application) with the text of the script being "run()".
  2815. >
  2816. >Any ideas?
  2817.  
  2818. I think that the problem may be the difference between
  2819. "do script" and "run". In AppleScript, "run" is equivalent
  2820. to "double-click on an application" in the finder, which
  2821. is equivalent to "OAPP" in Apple Event terminology.
  2822. Do Script is something else. Soooo.. Either have FileMaker
  2823. send some other event, or put "on Do Script()" into your
  2824. script.
  2825.  
  2826. Just a guess...
  2827.  
  2828. -William Cook
  2829. BAM! Software, Inc.
  2830. =========================================================================
  2831. Date:         Mon, 11 Apr 1994 23:50:13 -0500
  2832. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2833. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2834. From:         Manuel Veloso <veloso@NETCOM.COM>
  2835. Subject:      osax returning result & error?
  2836.  
  2837. Hi all,
  2838.  
  2839. I'm trying to write a few osaxen, and have come up with kind of a problem.
  2840. The osaxen in question are for DAM/DAL, and one of them has the potential
  2841. to return real data, as well as an error code (DBGetQueryResults). The
  2842. function itself returns an error if there's not enough memory for the whole
  2843. result, but also should return the results that were retrieved.
  2844.  
  2845. Right now, I'm returning the results of the query in the direct object,
  2846. with the error code being stuffed into the keyErrorNumber parameter. Is
  2847. this kosher? Is there some other way to do this? I suppose that DBState
  2848. should return the fact that data is waiting, but as the DAL server is far
  2849. away (I go about once or twice a week), I can't test this for sure.
  2850.  
  2851.  
  2852. Manuel
  2853. =========================================================================
  2854. Date:         Tue, 12 Apr 1994 01:18:00 -0400
  2855. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2856. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2857. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  2858. From:         ab026@FREENET.CARLETON.CA
  2859. Subject:      Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  2860.  
  2861. Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  2862.  
  2863. I have uploaded the newest versions of these three programs to
  2864. ftp://gaea.kgs.ukans.edu/incoming.  Hopefully they will show up
  2865. somewhere in the applescript directory shortly.
  2866.  
  2867. These are *free* programs, part of the AWOL Utilities package
  2868. recently uploaded to sumex and other sites.  (Other sites don't
  2869. have these most recent versions, though.)
  2870.  
  2871. With this software, you can control even non-scriptable applications,
  2872. local or remote, through their menu commands.  There's an 'osax' so
  2873. you can write scripts, and an entertaining application (Menu Grabber)
  2874. that uses Menu Events to reach out and grab a working copy of a
  2875. target application's menu bar.  All that is required of the target is
  2876. that it be Apple-event-aware (support program linking).  Note: There
  2877. are exceptions, including ResEdit, TeachText, and Finders prior to
  2878. 7.1.2.  (Notice a pattern?)
  2879.  
  2880. The programs are fully documented; it's not necessary to have a copy
  2881. of Help on Wheels to read the help files, but it helps.  :-)
  2882.  
  2883. Package contents are as follows:
  2884. Menu_Events_1.1.1.sit.Hqx
  2885.   Menu Events -- system extension supporting system event handler
  2886.   Menu Events Help -- Help on Wheels help file
  2887.   Menu Events Scripting Addition -- 'osax' dictionary
  2888.   Menu Events Sample Script -- sample AppleScript menu control script
  2889.   Menu Events.h -- MPW C header file for programmers
  2890. Menu_Grabber_1.1.1.sit.Hqx
  2891.   Menu Grabber -- application supporting remote control via menus
  2892.   Menu Grabber Help -- Help on Wheels help file
  2893. Help_on_Wheels_1.1.sit.Hqx
  2894.   Help on Wheels -- generic help server
  2895.  
  2896. Read the "About AWOL Utilities 1.1.1" file in each archive for more
  2897. info on the AWOL Utilities package.
  2898.  
  2899. Ross Brown - AWOL Software Productions
  2900. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  2901. publisher of AWOL Utilities - "the best deal in freeware!"
  2902. ab026@freenet.carleton.ca
  2903. =========================================================================
  2904. Date:         Tue, 12 Apr 1994 08:40:05 EDT
  2905. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2906. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2907. From:         "Sean M. Joyce" <sjoyce@HEIDELBERG.EDU>
  2908. Subject:      Anarchie/AppleScript/PPC Question
  2909.  
  2910. Please forgive me if this has been asked before or if this is not the
  2911. appropriate forum, but I am new to both Anarchie and this list.
  2912.  
  2913. Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  2914.  
  2915. Problem is this:  when I try to run the "Get Files" script to use Anarchie
  2916. to download files from an info-mac mirror, the machine bombs with a message
  2917. to the effect of "Floating point coprocessor not installed."
  2918.  
  2919. I understand that, in emulation, the PowerMacs do not provide an FPU.  Does
  2920. one of these programs require it, or is it simply an incompatibility
  2921. between these programs and the emulator?
  2922.  
  2923. TIA for any help.
  2924.  
  2925. --
  2926. Sean Joyce
  2927. sjoyce@heidelberg.edu
  2928. =========================================================================
  2929. Date:         Tue, 12 Apr 1994 06:08:32 PDT
  2930. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2931. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2932. From:         network_manager@ALDUS.COM
  2933. Organization: Aldus Corporation, Seattle, WA
  2934. Subject:      NDN:Anarchie/AppleScript/PPC Question
  2935.  
  2936. Your mail to the Microsoft Mail Server could not be fully
  2937. delivered!   No Valid Addresses!   It has been deleted.
  2938.  
  2939. Error List:
  2940.   Bad 'To:' Address: david.rogers@MSM-Inter
  2941. =========================================================================
  2942. Date:         Tue, 12 Apr 1994 09:54:03 -0400
  2943. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2944. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2945. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  2946. Subject:      Re: pause
  2947.  
  2948. an easier way to pause a script is in this format:
  2949.  
  2950. repeat until <condition>
  2951.  
  2952. end repeat
  2953.  
  2954. in your case, you would want to put "(is application running(stuffit)) is 
  2955. false"
  2956. in the place of <condition>. this will make your script do nothing until
  2957. stuffit is not running.
  2958.  
  2959. --
  2960. My opinions are mine only and tentative, pending further data
  2961.                         Matthew Ahrens
  2962. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  2963. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  2964. =========================================================================
  2965. Date:         Tue, 12 Apr 1994 09:48:52 -0400
  2966. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2967. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2968. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  2969. Subject:      Re: 'is app running' command?
  2970. In-Reply-To:  <9404111944.AA18677@fiu.edu>
  2971.  
  2972. Thanx for your reply, Hades...
  2973.         For the benefit of those that may be lurking or would feel
  2974. embarased to ask a stupid question:  Are there any scripting environments
  2975. that are of a Shareware nature?!  Anything comprable to commercial
  2976. offerings?  I love it when I see a product advertised with x,y, and z
  2977. features and they turn out to be the same features I've been using from
  2978. shareware sources for a fraction of the cost.
  2979. --Luis Muench
  2980.  
  2981. On Mon, 11 Apr 1994, Brian V. Hughes wrote:
  2982.  
  2983. > --Luis Muench wrote:
  2984. > >
  2985. > >Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  2986. > >PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  2987. > >read Info-Mac regularly, and have copped some of the AppleEvents progs and
  2988. > >like the power they concede!  Is there a starter kit for Scripting that
  2989. > >wont put me in the red (a.k.a. Userland's Frontier)?
  2990. >
  2991. >     If you are looking for a real scripting starter's kit, there are a
  2992. > couple of options for you. First of all you can buy the AppleScript
  2993. > Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
  2994. > with a really good set of manuals, including a pretty good Getting
  2995. > Started with AppleScript guide. The other choice is to buy one of the
  2996. > AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
  2997. > Both of these are supposed to be good for the novice scripter. If you
  2998. > have any kind of programming background, especially something like
  2999. > Hypercard, picking up AppleScript is pretty easy.
  3000. >
  3001. > -Hades
  3002. =========================================================================
  3003. Date:         Tue, 12 Apr 1994 06:54:00 PDT
  3004. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3005. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3006. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  3007. Subject:      Re: osax returning result & error?
  3008.  
  3009. >I'm trying to      For the benefit of those that may be lurking or would feel
  3010. >embarased to ask a stupid question:  Are there any scripting environments
  3011. >that are of a Shareware nature?!  Anything comprable to commercial
  3012. >offerings?
  3013.  
  3014.     Currently there aren't any. The closest is a scripting environment
  3015. for MPW written by Jon Pugh. I don't think Jon charges anything for his
  3016. scripting set-up, but when you have to pay upwards of $1000 for MPW...
  3017.  
  3018. >I love it when I see a product advertised with x,y, and z features and
  3019. >they turn out to be the same features I've been using from shareware
  3020. >sources for a fraction of the cost.
  3021.  
  3022.     Amen.
  3023.  
  3024. -Hades
  3025. =========================================================================
  3026. Date:         Tue, 12 Apr 1994 08:13:01 -0700
  3027. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3028. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3029. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  3030. Subject:      Re: Anarchie/AppleScript/PPC Question
  3031.  
  3032. >Please forgive me if this has been asked before or if this is not the
  3033. >appropriate forum, but I am new to both Anarchie and this list.
  3034. >
  3035. >Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  3036. >
  3037. >Problem is this:  when I try to run the "Get Files" script to use Anarchie
  3038. >to download files from an info-mac mirror, the machine bombs with a message
  3039. >to the effect of "Floating point coprocessor not installed."
  3040. >
  3041. >I understand that, in emulation, the PowerMacs do not provide an FPU.  Does
  3042. >one of these programs require it, or is it simply an incompatibility
  3043. >between these programs and the emulator?
  3044.  
  3045. I run Anarchie 1.1.3 on my Power Mac 8100/80.  I also run AppleScript 1.1,
  3046. although I use Frontier to script Anarchie.  I have no problems running
  3047. Anarchie on my 8100.  And the two trials I did make using AppleScript went
  3048. fine (although it wasn't the script you mention).
  3049.  
  3050. --John
  3051.  
  3052. --
  3053. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  3054. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  3055. =========================================================================
  3056. Date:         Tue, 12 Apr 1994 08:31:23 -0700
  3057. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3058. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3059. From:         David Ray <daver@NETCOM.COM>
  3060. Subject:      Re: pause
  3061.  
  3062. >an easier way to pause a script is in this format:
  3063. >
  3064. >repeat until <condition>
  3065. >
  3066. >end repeat
  3067. >
  3068. >in your case, you would want to put "(is application running(stuffit)) is
  3069. >false"
  3070. >in the place of <condition>. this will make your script do nothing until
  3071. >stuffit is not running.
  3072.  
  3073. This will work, but try to do something processor-intensive during the pause
  3074. and it won't get done. This sucks too much CPU power. Perhaps the degree
  3075. to which it sucks CPU time is related to which machine is used. I have a
  3076. Powerbook 100, and this is a significant issue. Perhaps on a Quadra or PPC
  3077. this is not such a big issue.
  3078.  
  3079. An example is downloading a file with ZTerm using an Applet (stay-open
  3080. Applescript App) in the background. The transfer rate is inversely proportional
  3081. to the CPU time being sucked by the Applet. Other examples of processor-
  3082. intensive tasks would be stuffing a large file, transfering a file with
  3083. Anarchie, watching a Quicktime movie, etc..
  3084.  
  3085. The on idle..end idle puts the least burden on the CPU.
  3086.  
  3087. -Dave
  3088.  
  3089. ------------------------------------------------------------------------------
  3090. David Ray                Dream Designs          Music Composition
  3091. daver@netcom.com         PO Box 5631            Interactive Multimedia
  3092. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  3093. =========================================================================
  3094. Date:         Tue, 12 Apr 1994 10:55:29 -0500
  3095. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3096. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3097. From:         Fred Terry <pfterry@LKS.CSI.COM>
  3098. Subject:      Re: fw:Menu Events, Menu Grabber,
  3099.               Help on Wheels at gaea.kgs.ukans.edu
  3100. In-Reply-To:  Your message of "Tue, 12 Apr 94 01:20:00 EDT"
  3101.  
  3102. Hi everyone,
  3103.  
  3104. >Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  3105. >
  3106. >I have uploaded the newest versions of these three programs to
  3107. >ftp://gaea.kgs.ukans.edu/incoming.  Hopefully they will show up
  3108. >somewhere in the applescript directory shortly.
  3109.  
  3110. You'll now find these in
  3111.  
  3112. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.1.sit.Hqx
  3113. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.1.sit.Hqx
  3114. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  3115. ftp://gaea.kgs.ukans.edu/applescript/addons/Help_on_Wheels_1.1.sit.Hqx
  3116.  
  3117. {How bout that, John :-}
  3118.  
  3119. pf
  3120. =========================================================================
  3121. Date:         Tue, 12 Apr 1994 14:58:35 -0500
  3122. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3123. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3124. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  3125. Subject:      None
  3126.  
  3127. REV MACSCRIPT BY userid
  3128. =========================================================================
  3129. Date:         Tue, 12 Apr 1994 12:32:40 PDT
  3130. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3131. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3132. From:         Michael Compton <compton@PTOLEMY.ARC.NASA.GOV>
  3133. Subject:      frontmost droplets?
  3134.  
  3135. Hi all,
  3136. I'm just beginning to play with FrontMost and have found that adding an
  3137. "on open" handler to a Project Script may not always make the a subsequent
  3138. saved app "droppable". Sometimes it does and sometimes it doesn't (although
  3139. the icon will have the little down-arrow).
  3140.  
  3141. Can anyone comment on whether it's a known problem or if I'm doing something
  3142. wrong?
  3143. Thanks,
  3144. -Michael Compton
  3145.  compton@ptolemy.arc.nasa.gov
  3146. =========================================================================
  3147. Date:         Tue, 12 Apr 1994 15:37:22 -0500
  3148. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3149. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3150. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  3151. Subject:      Re: Menu Events, Menu Grabber,
  3152.               Help on Wheels at gaea.kgs.ukans.edu
  3153.  
  3154. +Menu_Grabber_1.1.1.sit.Hqx
  3155. +  Menu Grabber -- application supporting remote control via menus
  3156. +  Menu Grabber Help -- Help on Wheels help file
  3157.  
  3158. Menu Grabber is way kewl. But iwas just able to restart my
  3159. colleagues mac, without he coming to know about. Aren't we
  3160. talkin a major security hole here? I know I know, u can turn
  3161. off your filesharin/linkin...but thats not what i am lookin at...
  3162.  
  3163. Finder AE's like restart/shutdown should be disabled...
  3164. Just my 187.348 roubles (approx US$0.02)
  3165. __ __
  3166. Marilyn Monroe
  3167. Bring Back the Goddess Inc.
  3168.  
  3169. Don't tell me later that folks in Temple think the same way
  3170. folks in Heaven do.
  3171. =========================================================================
  3172. Date:         Tue, 12 Apr 1994 16:20:15 -0400
  3173. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3174. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3175. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3176. Subject:      Re: Menu Events, Menu Grabber,
  3177.               Help on Wheels at gaea.kgs.ukans.edu
  3178. In-Reply-To:  <9404121941.AA01285@fiu.edu>
  3179.  
  3180. Norma Jean, your money not good here! BTW, AppleEvents should *NOT* be
  3181. disabled in the Finder ==> BUT you should have the _option_ to have YOUR
  3182. finder accept/not AE's.
  3183. Just my $60.00 pesos worth, y que viva Mexico...
  3184.  
  3185. On Tue, 12 Apr 1994, The Goddess Lives wrote:
  3186.  
  3187. > +Menu_Grabber_1.1.1.sit.Hqx
  3188. > +  Menu Grabber -- application supporting remote control via menus
  3189. > +  Menu Grabber Help -- Help on Wheels help file
  3190. >
  3191. > Menu Grabber is way kewl. But iwas just able to restart my
  3192. > colleagues mac, without he coming to know about. Aren't we
  3193. > talkin a major security hole here? I know I know, u can turn
  3194. > off your filesharin/linkin...but thats not what i am lookin at...
  3195. >
  3196. > Finder AE's like restart/shutdown should be disabled...
  3197. > Just my 187.348 roubles (approx US$0.02)
  3198. > __ __
  3199. > Marilyn Monroe
  3200. > Bring Back the Goddess Inc.
  3201. >
  3202. > Don't tell me later that folks in Temple thinkt only does file stuff
  3203. and it STILL requires AppleScript to implement the OSA.  Given the work
  3204. involved in writing AppleScript, it will quite some time before anyone
  3205. implements a shareware version of a decent scripting language that uses
  3206. aetes and all.
  3207.  
  3208.  
  3209. >I have an osax that will need to accept a parameter of any class
  3210. >(typeAnyType). There doesn't seem to be a way, though, to get this type
  3211. >within an osax. Another way would be to pass the type of the object as
  3212. >another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
  3213. >theItem), but it seems kind of like a kludge. Is there some supported way
  3214. >to do this?
  3215.  
  3216. Here's one:
  3217.  
  3218. AEGetParamPtr(&theAppleEvent,
  3219.                 theAEKeyword,
  3220.                 desiredType,    <-- the type you want (or typeWildCard)
  3221.                 &typeCode,      <-- the actual type before coercion
  3222.                 dataPtr,
  3223.                 maximumSize,    <-- use 0 here to skip the data
  3224.                 &actualSize);
  3225.  
  3226. Here's another:
  3227.  
  3228. AESizeOfParam(&theAEEvent,
  3229.                 theAEKeyword,
  3230.                 &typeCode,      <-- the type of the parameter
  3231.                 &dataSize);
  3232.  
  3233. Jon
  3234. =========================================================================
  3235. Date:         Wed, 13 Apr 1994 14:51:43 +0800
  3236. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3237. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3238. From:         Peter N Lewis <peter.lewis@INFO.CURTIN.EDU.AU>
  3239. Subject:      Re: Anarchie Question
  3240.  
  3241. [Note: I don't read this list (it's too much to wade thru and I'm busy
  3242. working on a dozen projects), but I have very efficient front end
  3243. processors for the list so I'll try to respond to any queries about
  3244. Anarchie, though you might be better to cc me when posting such queries]
  3245.  
  3246. >Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  3247.  
  3248. I've tested Anarchie briefly on the PowerMacs, and it seems to work fine,
  3249. though I didn't try out the AppleScripts.  Anarchie does not use floating
  3250. point anywhere.
  3251.  
  3252. >I don't know.  I can't see why Anarchie would be using floating point, and
  3253. >if it were I can't see why it would be going directly to the coprocessor.
  3254. >However, I've had absolutely no success with Anarchie's scripts and I'm
  3255. >using a Quadra 700 and AppleScript 1.1.
  3256.  
  3257. The scripts distributed with Anarchie are in 1.1 format and should work ok.
  3258. I can mail anyone the scripts in text format if they're interested.  The
  3259. quit event had a problem (it was in the wrong suite), and I think the
  3260. cut/copy/etc events are also in the wrong suite.
  3261.  
  3262. In any event, Anarchie scripting is pretty trivial, you should be able to
  3263. write your own from scratch or by refering to the docs file fairly easily.
  3264.  
  3265. tell application "Anarchie"
  3266.   with timeout of 5 * 60 seconds
  3267.     find "dehqx" server "archie.internic.net" matches 20 with window
  3268.     fetch file "HD:black-cat-startup.hqx" host "sumex-aim.stanford.edu"
  3269. path "/info-mac/grf/black-cat-startup.hqx"
  3270.     list file "HD:listing" host "sumex-aim.stanford.edu" path "/info-mac"
  3271.     store file "HD:file" host "sumex-aim.stanford.edu" path "/incoming"
  3272.  
  3273.     fetch url "sumex-aim.stanford.edu:/info-mac/grf/black-cat-startup.hqx"
  3274.  
  3275.   end timeout
  3276. end tell
  3277.  
  3278. Enjoy,
  3279.    Peter.
  3280.  
  3281. _______________________________________________________________________
  3282. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  3283. =========================================================================
  3284. Date:         Wed, 13 Apr 1994 00:35:00 -0400
  3285. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3286. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3287. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  3288. From:         ab026@FREENET.CARLETON.CA
  3289. Subject:      Re: Menu Events, Menu Grabber,
  3290.  
  3291. Marilyn Monroe wrote:
  3292.  
  3293. >+Menu_Grabber_1.1.1.sit.Hqx
  3294. >+  Menu Grabber -- application supporting remote control via menus
  3295. >+  Menu Grabber Help -- Help on Wheels help file
  3296. >
  3297. >Menu Grabber is way kewl. But iwas just able to restart my
  3298. >colleagues mac, without he coming to know about. Aren't we
  3299. >talkin a major security hole here? I know I know, u can turn
  3300. >off your filesharin/linkin...but thats not what i am lookin at...
  3301. >
  3302. >Finder AE's like restart/shutdown should be disabled...
  3303. >Just my 187.348 roubles (approx US$0.02)
  3304.  
  3305. Major hole!  There's a whole section in Menu Events Help that talks
  3306. about this issue.  (Just to clarify, Menu Events and Menu Grabber don't
  3307. use Finder AE's like 'FNDR'/'rest', but you can tell them to select a
  3308. menu item in Finder called "Restart".)
  3309.  
  3310. If you have Menu Events installed, here's how to protect yourself
  3311. against Marilyn and her kind:
  3312. 1.  Turn off Program Linking in Sharing Setup, so that Menu Events and
  3313.     Menu Grabber will only work locally; or
  3314. 2.  Deny guests the privilege of linking to programs on your Mac; or
  3315. 3.  Use a particular application's Sharing dialog to turn off remote
  3316.     program linking (does this work on 7.1.2's Finder?); or
  3317. 4.  Lock the Menu Events extension file (startup icon will reflect this
  3318.     change), so that only applications running in kAEInteractWithAll
  3319.     mode will accept a Select Menu Item event from a remote sender.
  3320.     I doubt there are many non-scriptable applications which choose to
  3321.     run in this mode, or which let you select this mode through GUI.
  3322.     kAEInteractWithLocal is the default, and Menu Events cleverly
  3323.     overrides that setting if you don't lock it - hence the hole!
  3324.  
  3325. Happy grabbing,
  3326. Ross
  3327.  
  3328. --
  3329. Ross Brown - AWOL Software Productions
  3330. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  3331. publisher of AWOL Utilities - "the best deal in freeware!"
  3332. ab026@freenet.carleton.ca
  3333. =========================================================================
  3334. Date:         Wed, 13 Apr 1994 08:54:19 EDT
  3335. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3336. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3337. From:         William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
  3338. Subject:      ARA
  3339.  
  3340. ok, does anyone know how to send an event to ARA that tells it to answer
  3341. the phone or not to answer the phone.  I found a raw event called answ using
  3342. AETracker but it only seemed to find it once and I can't seem to duplicate it.
  3343.  
  3344. I know that ARA does not officially recognize apple events but if there is
  3345. a way...
  3346.  
  3347. I am currently using Quickkeys to accomplish my goals but I am a purest...
  3348.  
  3349. Bill
  3350. =========================================================================
  3351. Date:         Wed, 13 Apr 1994 08:56:12 EDT
  3352. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3353. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3354. From:         William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
  3355. Subject:      oh yea, and the network cdev
  3356.  
  3357. I also want a way to use Apple events to change from local talk to ether
  3358. with out opening the network control panel...
  3359.  
  3360. Bill
  3361. =========================================================================
  3362. Date:         Wed, 13 Apr 1994 10:19:48 -0400
  3363. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3364. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3365. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  3366. Subject:      Re: Shareware scripting environments...
  3367.  
  3368. well, Tickle is sort of a scripting language. it includes 2 OSA scripting
  3369. languages, J-APL and TCL. i think it is at gaea as
  3370. "applescript/scriptableapps/tickle.hqx" or something like that.
  3371.  
  3372. --
  3373. My opinions are mine only and tentative, pending further data
  3374.                         Matthew Ahrens
  3375. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  3376. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  3377. =========================================================================
  3378. Date:         Wed, 13 Apr 1994 10:51:26 -0400
  3379. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3380. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3381. From:         David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
  3382. Subject:      Example Eudora Scripts
  3383.  
  3384. Greetings,
  3385.         I'm looking for AppleScript examples to control Eudora 1.4.2.  I
  3386. found a short example somewhere but it doesn't seem to work properly (I'm
  3387. using AS 1.0 with the various bits from The Tao...).  Does anyone have an
  3388. actual working script that does something like beep twelve times when
  3389. mailings from this list show up, or save TidBITS mailings in a folder with
  3390. an EasyView viewer?  My running Applet or Droplet, or watever it's called,
  3391. gets a notification event, but I can't seem to get the new message data
  3392. that Eudora is supposed to pass.    If you're too shy to post your
  3393. imperfect script please email.  Any help is appreciated.
  3394.  
  3395. --Dave
  3396. =========================================================================
  3397. Date:         Wed, 13 Apr 1994 11:27:05 -0400
  3398. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3399. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3400. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3401. Subject:      Restarting remote mac
  3402.  
  3403. Is there any way to restart a remote mac (assuming you have all the proper
  3404. access privs) without having to deal with extensions that need a restart in
  3405. the first place?
  3406.         I have come across some pretty cool software that allows you to
  3407. either restart, shut down, or turn off/on filesharing remotely.  I use
  3408. these to leave my mac on at work on Friday, and if I so desire, I can ARA
  3409. from home and switch my mac off or do a restart.  But the caveat exists
  3410. that I must pre-install the extensions that would do this.  Would it be
  3411. possible to have some sort of script that you could launch on a remote mac
  3412. and it would send a local restart command, thus avoiding the above caveat?
  3413.  
  3414. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3415. <<<<<<Reality is anything that cannot be undone or avoided
  3416. >>>>>>Luis Muench -- muench@solix.fiu.edu
  3417. =========================================================================
  3418. Date:         Wed, 13 Apr 1994 11:32:08 -0600
  3419. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3420. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3421. From:         K J Fox <kjfox@MKE.AB.COM>
  3422. Subject:      FaceSpan - FrontMost
  3423.  
  3424. Pardon me if this question has been asked:
  3425.  
  3426. MacWeek indicates that FaceSpan is a newer version
  3427. of FrontMost.  How does one get it if I already own
  3428. FrontMost, and does it cure the memory leak spoken
  3429. of a few weeks ago?
  3430.  
  3431. Thanks!
  3432.  
  3433. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  3434. Kenneth J. Fox
  3435. Rockwell Automation - Allen Bradley Co.
  3436. Milwaukee, WI (414)382-3287 Voice
  3437. kjfox@mke.ab.com
  3438. =========================================================================
  3439. Date:         Wed, 13 Apr 1994 12:40:39 -0400
  3440. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3441. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3442. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  3443. Subject:      Re: FaceSpan - FrontMost
  3444. In-Reply-To:  <no.id> from "K J Fox" at Apr 13, 94 11:32:08 am
  3445.  
  3446. --K J Fox wrote:
  3447. >
  3448. >MacWeek indicates that FaceSpan is a newer version of FrontMost.  How
  3449. >does one get it if I already own FrontMost, and does it cure the memory
  3450. >leak spoken of a few weeks ago?
  3451.  
  3452.     We won't know any of this until Software Designs Unlimited, the
  3453. makers of FaceSpan (Frontmost - note correct spelling), officially
  3454. release FaceSpan as a product. Currently, you can only get Frontmost,
  3455. and only when you buy either the AppleScript Scripter's Kit or the
  3456. AppleScript Developer's Toolkit.
  3457.  
  3458. -Hades
  3459. =========================================================================
  3460. Date:         Wed, 13 Apr 1994 12:18:21 -0800
  3461. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3462. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3463. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  3464. Subject:      Re: Restarting remote mac
  3465.  
  3466. >Is there any way to restart a remote mac (assuming you have all the proper
  3467. >access privs) without having to deal with extensions that need a restart in
  3468. >the first place?
  3469. >        I have come across some pretty cool software that allows you to
  3470. >either restart, shut down, or turn off/on filesharing remotely.  I use
  3471. >these to leave my mac on at work on Friday, and if I so desire, I can ARA
  3472. >from home and switch my mac off or do a restart.  But the caveat exists
  3473. >that I must pre-install the extensions that would do this.  Would it be
  3474. >possible to have some sort of script that you could launch on a remote mac
  3475. >and it would send a local restart command, thus avoiding the above caveat?
  3476. >
  3477. >++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3478. +
  3479. ><<<<<<Reality is anything that cannot be undone or avoided
  3480. >>>>>>>Luis Muench -- muench@solix.fiu.edu
  3481.  
  3482. As a shameless plug for a company I am involved with, There is a hardware
  3483. device called the PowerSwitch LT that can control power to a Mac and send
  3484. an ADB toggle via a LocalTalk connection. It is a network device
  3485. independent of the device whos power it controls. You can control it with
  3486. HyperCard XCMDs and it would be pretty easy to tell a HyperCard stack to
  3487. start or power off a remote Mac via a network connection and AppleScript.
  3488.  
  3489. They are:
  3490. Radiant@applelink.apple.com
  3491.  
  3492. The PowerSwitch LT is somewhere under $200 or so.
  3493.  
  3494. Kee Nethery
  3495.  
  3496. _________________________________________________________________
  3497. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  3498. =========================================================================
  3499. Date:         Wed, 13 Apr 1994 16:12:50 -0400
  3500. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3501. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3502. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  3503. Subject:      Re: Restarting remote mac
  3504.  
  3505. >The PowerSwitch LT is somewhere under $200 or so.
  3506. >
  3507. >Kee Nethery
  3508.  
  3509. Kee - is this related to that device that adds soft power-on power-off to
  3510. Macs without it?  If so, can you tell me something about that product? (I
  3511. thought it was a LOT cheaper then $200!)  Also, does it work with PowerMacs
  3512. now, and is your company planning a "fat binary" version so that it doesn't
  3513. slow down the PowerMacs (as recently reported in several magazines, non
  3514. "fat-binary" extensions on PowerMacs can cause SIGNIFICANT slowdowns -
  3515. about 20 to 30% for AfterDark alone!)
  3516.  
  3517. Steve
  3518.  
  3519. ---------------------
  3520.  jonke@gsfc.nasa.gov
  3521. ---------------------
  3522. =========================================================================
  3523. Date:         Wed, 13 Apr 1994 16:14:29 -0400
  3524. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3525. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3526. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  3527. Subject:      Re: Restarting remote mac
  3528.  
  3529. Oops - sorry about that folks.  I had intended to send that question about
  3530. the PowerKey directly to Kee.  Sorry about sending it to the world....
  3531.  
  3532. Steve
  3533.  
  3534. ---------------------
  3535.  jonke@gsfc.nasa.gov
  3536. ---------------------
  3537. =========================================================================
  3538. Date:         Wed, 13 Apr 1994 16:57:00 EDT
  3539. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3540. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3541. From:         "William J. Jamison" <jami1@AOL.COM>
  3542. Subject:      Re: Restarting remote mac
  3543.  
  3544. Another shameless plug. Farallon will love me.
  3545. Timbuktu Remote in conjunction with their 9600 baud V.32 modem (a package
  3546. deal)comes with a modem cord that has an extra little pigtailed  cord on the
  3547. mini-din end that plugs into the ADB port (if you have a spare). This enables
  3548. you to call in to _some_ sleeping Macs (no longer works on my AV, for one
  3549. thing I gave up my Farallon modem in favor of the GeoPort, not much sense in
  3550. tying up 2 modems) and wake them up. If you could just get hold of the
  3551. cord...? Maybe.
  3552. =========================================================================
  3553. Date:         Wed, 13 Apr 1994 17:51:00 -0400
  3554. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3555. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3556. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  3557. From:         ab026@FREENET.CARLETON.CA
  3558. Subject:      Re: Restarting remote mac
  3559.  
  3560. >Is there any way to restart a remote mac (assuming you have all the proper
  3561. >access privs) without having to deal with extensions that need a restart in
  3562. >the first place?
  3563. >        I have come across some pretty cool software that allows you to
  3564. >either restart, shut down, or turn off/on filesharing remotely.  I use
  3565. >these to leave my mac on at work on Friday, and if I so desire, I can ARA
  3566. >from home and switch my mac off or do a restart.  But the caveat exists
  3567. >that I must pre-install the extensions that would do this.  Would it be
  3568. >possible to have some sort of script that you could launch on a remote mac
  3569. >and it would send a local restart command, thus avoiding the above caveat?
  3570.  
  3571. This works for me in System 7.1, even though the Finder's not scriptable yet:
  3572.  
  3573. tell application "Finder" to <<event FNDRrest>> -- substitute guillemots for <>
  3574.  
  3575. Save that script as an application, then use a Finder event to launch this
  3576. application from wherever you're sitting.  (Open Selection can be run from
  3577. a remote Mac, but Restart can't.)  If any application puts up a prompt dialog
  3578. when told to quit, you're stuck, unfortunately, though you could try using
  3579. the Autotype 'osax' to pump a stream of "Enter" keystrokes at these dialogs.
  3580.  
  3581. Ross Brown - AWOL Software Productions
  3582. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  3583. publisher of AWOL Utilities - "the best deal in freeware!"
  3584. ab026@freenet.carleton.ca
  3585. =========================================================================
  3586. Date:         Wed, 13 Apr 1994 18:25:09 -0400
  3587. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3588. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3589. From:         Gustavo Benzecri <gbenze@CONICIT.VE>
  3590. Subject:      Re: Example Eudora Scripts
  3591.  
  3592. >Greetings,
  3593. >        I'm looking for AppleScript examples to control Eudora 1.4.2.  I
  3594. >found a short example somewhere but it doesn't seem to work properly (I'm
  3595. >using AS 1.0 with the various bits from The Tao...).  Does anyone have an
  3596. >actual working script that does something like beep twelve times when
  3597. >mailings from this list show up, or save TidBITS mailings in a folder with
  3598. >an EasyView viewer?  My running Applet or Droplet, or watever it's called,
  3599. >gets a notification event, but I can't seem to get the new message data
  3600. >that Eudora is supposed to pass.    If you're too shy to post your
  3601. >imperfect script please email.  Any help is appreciated.
  3602. >
  3603. >--Dave
  3604.  
  3605. The following is a short script I wrote some days ago that helps me to
  3606. classify the incoming mail into selected Eudora's mailboxes according to a
  3607. pattern in the sender field:
  3608.  
  3609. -------- script begins here --------
  3610. set fieldLabel to "sender"
  3611. set rules to {{"MACSCRPT", "AppleScript"}, {"4d@", "4th-Dimension"}}
  3612. tell application "Eudora"
  3613.  activate
  3614.  repeat with m from (count message of mailbox "in" of mail folder "") to 1 by 
  3615. -1
  3616.   set theMessage to (a reference to message m of mailbox "in" of mail folder 
  3617. "")
  3618.   try
  3619.    set fieldSender to field fieldLabel of theMessage
  3620.    set proceed to true
  3621.   on error
  3622.    set proceed to false
  3623.   end try
  3624.   if proceed then
  3625.    repeat with theRule in rules
  3626.     if fieldSender contains item 1 of theRule then
  3627.      try
  3628.       set mailFolder to (a reference to mail folder (item 3 of theRule))
  3629.      on error
  3630.       set mailFolder to (a reference to mail folder "")
  3631.      end try
  3632.      move theMessage InsertHere end of mailbox (item 2 of theRule) of 
  3633. mailFolder
  3634.      exit repeat
  3635.     end if
  3636.    end repeat
  3637.   end if
  3638.  end repeat
  3639. end tell
  3640. -------- script ends here --------
  3641.  
  3642. The "rules" field guides the script to what to do with the incoming mail.
  3643. In the example above all mail with "MACSCRPT" anywhere in the sender field
  3644. goes to the "AppleScript" mailbox and all the mail with "4d@" goes to the
  3645. "4th-Dimension" mailbox. You can define a third field if the target mailbox
  3646. is inside a mail folder.
  3647.  
  3648. I think the script could be modified to store text files such as the
  3649. TidBITS mailings simply replacing the "move" command with a "save" command
  3650. and adding a folder path string to the rules.
  3651.  
  3652. Hope this helps,
  3653.  
  3654. -- Gustavo
  3655. =========================================================================
  3656. Date:         Wed, 13 Apr 1994 16:30:34 -0600
  3657. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3658. Sender:       Macintosh l type, the AE
  3659. calls notwithstanding.
  3660.  
  3661. I'm suprised that the type information is still present with the data...I
  3662. thought that when the data's converted to the generic type for the osax,
  3663. type info would be lost along the way. It's nice to know that the AE system
  3664. is robust in this sense. Since I need to get certain types, I'll be going
  3665. the AEGetParamPtr route (as I do with the rest of the parameters).
  3666.  
  3667. Thanks,
  3668.  
  3669. Manuel
  3670. =========================================================================
  3671. Date:         Thu, 14 Apr 1994 00:38:54 -0500
  3672. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3673. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3674. From:         Manuel Veloso <veloso@NETCOM.COM>
  3675. Subject:      Class of data object from wildcard (summary)
  3676.  
  3677. Hmmm. I'm starting to get my head around the relationship between the AE
  3678. manager and applescript. Lets see....
  3679.  
  3680. Any given data parameter that is passed to a scripting addition is first
  3681. targeted down to a specific apple-event to the addition. Then, the data is
  3682. stuffed into an apple-event descriptor that fits the data format specified
  3683. in the scripting addition's aete. During this time, no coercion of the data
  3684. takes place (unless the 'as xxxxx' syntax is used); the data is passed
  3685. as-is, with the actual type of the data being a part of the above
  3686. descriptor.
  3687.  
  3688. Then, the descriptor gets built into an appleevent that gets passed onto
  3689. the scripting addition. Since the data structure (not contents) has been
  3690. validated by AppleScript, it's sort of guaranteed that the data is at least
  3691. in the correct structure, and that the minimum number of required
  3692. parameters are present.
  3693.  
  3694. It is actually the addition that performs/requests coercions, when it pulls
  3695. the info out of the appleevent...the data may be in any form before the
  3696. coercion takes place, with the assumption being the data is convertible. So
  3697. if testaddition takes a long as a parameter, but is passed a string like
  3698. "15542", the text string "15542" is passed with its type as typeText.
  3699.  
  3700. So basically, that means that most/all of applescript's structures (lists,
  3701. records, etc) mirror the ones in IM-IAC, and that OSA scripting
  3702. environments are basically data validation/front-ends/editors for the
  3703. apple-event manager.
  3704.  
  3705. How far/near is this description to reality? And, is there some document or
  3706. something that bridges between OSA and the AppleEvent manager?
  3707.  
  3708. >>>        For the benefit of those that may be lurking or would feel
  3709. >
  3710. >Here's one:
  3711. >
  3712. >AEGetParamPtr(&theAppleEvent,
  3713. >                theAEKeyword,
  3714. >                desiredType,    <-- the type you want (or typeWildCard)
  3715. >                &typeCode,      <-- the actual type before coercion
  3716. >                dataPtr,
  3717. >                maximumSize,    <-- use 0 here to skip the data
  3718. >                &actualSize);
  3719. >
  3720. >Here's another:
  3721. >
  3722. >AESizeOfParam(&theAEEvent,
  3723. >                theAEKeyword,
  3724. >                &typeCode,      <-- the type of the parameter
  3725. >                &dataSize);
  3726. >
  3727. >Jon
  3728. =========================================================================
  3729. Date:         Thu, 14 Apr 1994 09:03:13 -0400
  3730. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3731. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3732. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  3733. Subject:      Finder files v. Finder aliases?
  3734.  
  3735. Can anybody tell me why the following piece of code:
  3736.  
  3737. set fd to open for access {file destinationFile}
  3738. set theText to read fd from 1 to -1 as text
  3739. close access fd
  3740. display dialog theText
  3741.  
  3742. works when destinationFile is a real file (in this case, created by
  3743. TeachText), but does not work when it is an alias to the same real file
  3744. (such as created by "Make Alias" from the File menu or by "symlink" in
  3745. MacPerl).  In the case when destinationFile is an alias, I get an "End of
  3746. file error".  Note that I get the same behavior when the first line reads:
  3747.  
  3748. set fd to open for access {alias destinationFile}
  3749.  
  3750. I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
  3751. Finder aliases were like Unix symbolic links.
  3752.  
  3753. BTW, some applications don't seem to mind these aliases:
  3754.  
  3755. tell application "Simple Player" to open {alias destinationFile}
  3756.  
  3757. works fine, but
  3758.  
  3759. tell application "Sound Machine" to open {alias destinationFile}
  3760.  
  3761. doesn't.  In the first case, SimplePlayer opens up the movie file as you
  3762. would expect.  In the second case, SoundMachine shows in its control panel
  3763. that the file has been opened, but will not play it automatically even if
  3764. "play on open" is specified.  It will play it if you mouse on the control
  3765. panel.  Again, if destinationFile is a real file, everything works.  If it
  3766. is a Finder alias, it doesn't.  Any clues?
  3767.  
  3768. Thanks,
  3769.                                 -Steve.
  3770.  
  3771. +--------------------------------------------------------------+
  3772. | Steven L. Rohall                                             |
  3773. |                            ________ _        ______  ______  |
  3774. | 55 Walkers Brook Drive        /    / \      /     / /     /  |
  3775. | Reading, MA 01867-3297       /    /___\    /______ /         |
  3776. | Tel: (617)942-2000          /    /     \         //          |
  3777. | Fax: (617)942-7100         /    /       \/______//______/    |
  3778. | slrohall@tasc.com                                            |
  3779. | (MIME-conformant mail welcome.)                              |
  3780. +--------------------------------------------------------------+
  3781. =========================================================================
  3782. Date:         Thu, 14 Apr 1994 10:01:44 -0500
  3783. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3784. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3785. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  3786. Subject:      MoveFilestoTrash
  3787.  
  3788. Is anyone having problems with this osax?  When I use it to try and move a
  3789. folder on a network-mounted volume to the trash, I get a dialog stating
  3790. that the folder already exists there and do I want to replace the existing
  3791. one.  This happens even when the trash on both machines is empty.  Any
  3792. ideas?  I need to postpone actually deleting the folder, so deletefiles()
  3793. isn't an option.
  3794.  
  3795. King Rhoton                                             king@acpub.duke.edu
  3796. =========================================================================
  3797. Date:         Thu, 14 Apr 1994 10:05:27 -0500
  3798. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3799. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3800. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  3801. Subject:      MoveFilestoTrash, cont...
  3802.  
  3803. >Is anyone having problems with this osax?  When I use it to try and move a
  3804. >folder on a network-mounted volume to the trash, I get a dialog stating that
  3805. >the folder already exists there and do I want to replace the existing one.
  3806.  
  3807. Sorry, I misspoke.  Actually, what the dialog says is that the folder
  3808. already exists: OK, cancel.  If I choose cancel, nothing happens to the
  3809. folder, and if I choose OK, the folder gets deleted (no fat trash can, no
  3810. nothing).  Very frustrating.
  3811.  
  3812. King Rhoton                                             king@acpub.duke.edu
  3813. =========================================================================
  3814. Date:         Thu, 14 Apr 1994 10:09:09 -0500
  3815. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3816. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3817. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  3818. Subject:      MoveFilestoTrash, cont 2...
  3819.  
  3820. >Is anyone having problems with this osax?
  3821.  
  3822. And, come to think of it, it's not an osax, it's part of the FinderLib
  3823. script.  Man, I hate tax time....
  3824.  
  3825. King Rhoton                                             king@acpub.duke.edu
  3826. =========================================================================
  3827. Date:         Thu, 14 Apr 1994 10:15:41 -0500
  3828. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3829. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3830. From:         David Myers <dcmyers@ACCESS.DIGEX.NET>
  3831. Subject:      Frontier price increased to $495???
  3832.  
  3833. The newest MacWeek has a comparison between UserLand Frontier and
  3834. AppleScript.  The review was balanced overall in my opinion, but one
  3835. item really caught me by surprise.  Apparently, UserLand has increased
  3836. the price to $495!  I'm glad I've already bought it, because I never
  3837. would have paid that much for it.  Putting aside questions of whether
  3838. it is "worth it" or not, I simply could not have afforded it.
  3839.  
  3840. Does anybody else agree with me that this will kill the market for the
  3841. product?  I have assumed all along that UserLand was targeting the
  3842. hobbyist/tinkerer rather than the corporate developer...
  3843.  
  3844.  
  3845. ____________________________________________________
  3846.  
  3847. David C. Myers
  3848. dcmyers@access.digex.net
  3849. =========================================================================
  3850. Date:         Thu, 14 Apr 1994 10:32:01 -0400
  3851. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3852. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3853. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  3854. Subject:      OSA Menu
  3855.  
  3856. I have a script that does an operation on the finder selection, and it runs
  3857. find from the script editor, but it would be a lot more useful if i could run
  3858. it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
  3859. it gives me an error of -1762. What does this mean, and how can i fix it?
  3860.  
  3861. also, what is the email address of Leonard Rosenthal, the author of OSA Menu?
  3862. (so that i can ask him this question also)
  3863.  
  3864. tia!!
  3865.  
  3866. --
  3867. My opinions are mine only and tentative, pending further data
  3868.                         Matthew Ahrens
  3869. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  3870. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  3871. =========================================================================
  3872. Date:         Thu, 14 Apr 1994 10:31:30 -0400
  3873. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3874. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3875. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3876. Subject:      Re: Frontier price increased to $495???
  3877. In-Reply-To:  <9404141418.AA25407@fiu.edu>
  3878.  
  3879. Whoa, dude!  $495.00.  Sheesh!  I think its time someone (who can) should
  3880. create a "Bare-Bones" scripting environment for us po'folk on the net.  I
  3881. WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
  3882.  
  3883. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3884. <<<<<<Reality is anything that cannot be undone or avoided
  3885. >>>>>>Luis Muench -- muench@solix.fiu.edu
  3886.  
  3887.  
  3888. On Thu, 14 Apr 1994, David Myers wrote:
  3889.  
  3890. > The newest MacWeek has a comparison between UserLand Frontier and
  3891. > AppleScript.  The review was balanced overall in my opinion, but one
  3892. > item really caught me by surprise.  Apparently, UserLand has increased
  3893. > the price to $495!  I'm glad I've already bought it, because I never
  3894. > would have paid that much for it.  Putting aside questions of whether
  3895. > it is "worth it" or not, I simply could not have afforded it.
  3896. >
  3897. > Does anybody else agree with me that this will kill the market for the
  3898. > product?  I have assumed all along that UserLand was targeting the
  3899. > hobbyist/tinkerer rather than the corporate developer...
  3900. >
  3901. >
  3902. > ____________________________________________________
  3903. >
  3904. > David C. Myers
  3905. > dcmyers@access.digex.net
  3906. =========================================================================
  3907. Date:         Thu, 14 Apr 1994 10:50:17 -0400
  3908. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3909. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3910. From:         David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
  3911. Subject:      Re: Example Eudora Scripts
  3912.  
  3913. Thanks for all the help everyone.  I've downloaded the list archives to use
  3914. with  EasyView (lots of useful stuff) and your specific examples are very
  3915. helpful.  The one script fragment that does not work for me is the
  3916. following:
  3917.  
  3918. >on <<event CSOmeNot>> msgList
  3919. >        copy (count of items in msgList) to msgNum
  3920. >        repeat with i from 1 to msgNum
  3921. >           tell application "Eudora"
  3922. >                 if field "Subject" of (item i of msgList as message)
  3923. >contains "test" then
  3924. >                         beep -- here's where you process the message
  3925. >                 end if
  3926. >           end tell
  3927. >        end repeat
  3928. >end <<event CSOmeNot>>
  3929.  
  3930. I have been able to register with Eudora (1.4.2) and I get the New Mail
  3931. notification, but the parameter msgList is always empty if I, say, try to
  3932. place it in Scriptable Text Editor.  What's supposed to be in there?  Are
  3933. these supposed to be only the new messages (that's exactly what I need)?  I
  3934. should be able to work around it by directly asking Eudora for the info,
  3935. but has anyone else got this to work?
  3936.  
  3937. --Dave
  3938.  
  3939.  
  3940.  
  3941. David L. Brown <dlb1@lle.rochester.edu>
  3942. Laboratory for Laser Energetics
  3943. 250 East River Road
  3944. Rochester, NY 14623 USA                                           UR  \|/
  3945. -----------------------------------------------------------------------*--
  3946. (716) 275-6880                                                    LLE /|\
  3947. =========================================================================
  3948. Date:         Thu, 14 Apr 1994 11:00:41 -0500
  3949. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3950. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3951. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  3952. Subject:      Re: Menu Events, Menu Grabber,
  3953.  
  3954.  >Menu Grabber is way kewl. But iwas just able to restart my
  3955.  >colleagues mac, without he coming to know about. Aren't we
  3956.  >talkin a major security hole here? I know I know, u can turn
  3957.  >off your filesharin/linkin...but thats not what i am lookin at...
  3958.  
  3959.  (Just to clarify, Menu Events and Menu Grabber don't use Finder AE's
  3960.   like 'FNDR'/'rest', but you can tell them to select a menu item in
  3961.   Finder called "Restart".)
  3962.  
  3963. which when you choose will restart the Mac. I think the endresult is
  3964. a bit too interesting than the actual process that is involved. clear!
  3965.  
  3966.  If you have Menu Events installed, here's how to protect yourself
  3967.  against Marilyn and her kind:
  3968.  
  3969. Yup, always use protection, it helps in any case. Gawd, if only they
  3970. practised it in the sixties...
  3971.  
  3972.  1.  Turn off Program Linking in Sharing Setup, so that Menu Events
  3973.      and Menu Grabber will only work locally; or
  3974.  2.  Deny guests the privilege of linking to programs on your Mac; or
  3975.  
  3976. In other words, go back to '60s, make your Mac an ugly standalone,
  3977. rip all its kewl sharin features, don't let anyone touch your mac,
  3978. not even to play Bolo or SuperMaze wars..
  3979.  
  3980.  3.  Use a particular application's Sharing dialog to turn off remote
  3981.      program linking (does this work on 7.1.2's Finder?); or
  3982.  
  3983. What was thaat again.....
  3984.  
  3985.  4.  Lock the Menu Events extension file (startup icon will reflect
  3986.      change), so that only applications running in kAEInteractWithAll
  3987.      mode will accept a Select Menu Item event from a remote sender.
  3988.      I doubt there are many non-scriptable applications which choose
  3989.      run in this mode, or which let you select this mode through GUI.
  3990.      kAEInteractWithLocal is the default, and Menu Events cleverly
  3991.      overrides that setting if you don't lock it - hence the hole!
  3992.  
  3993. Hmmm.. I have to try this, and see what happens. Its interestin to
  3994. see how it overrides that setting of any appl, even if the appl is
  3995. locked, when the menu events extnsn ain't locked.
  3996.  
  3997. But as i said before, menu events is still kewl, it is just its
  3998. spokesman who ain't. :-)))))
  3999.  
  4000. __ __
  4001. Marilyn Monroe
  4002. Bring Back the Goddess Inc.
  4003.  
  4004. Don't tell me later that folks in Temple think the same way
  4005. folks in Heaven do.
  4006. =========================================================================
  4007. Date:         Thu, 14 Apr 1994 08:20:06 LCL
  4008. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4009. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4010. From:         Tim Keanini <Tim_Keanini@BRODER.COM>
  4011. Subject:      Re: Frontier price == $495???
  4012.  
  4013. >The newest MacWeek has a comparison between UserLand Frontier and
  4014. >AppleScript.  The review was balanced overall in my opinion, but one
  4015. >item really caught me by surprise.  Apparently, UserLand has increased
  4016. >the price to $495!  I'm glad I've already bought it, because I never
  4017. >would have paid that much for it.  Putting aside questions of whether
  4018. >it is "worth it" or not, I simply could not have afforded it.
  4019.  
  4020. I am happy that I bought it early too.:-)
  4021.  
  4022. >Does anybody else agree with me that this will kill the market for the
  4023. >product?  I have assumed all along that UserLand was targeting the
  4024. >hobbyist/tinkerer rather than the corporate developer...
  4025.  
  4026. I have gotten 90% of all my work this past 2 years done in Frontier.
  4027. I still don't think that Applescript ships with enough stuff to call itself a
  4028. development system (no good debugger yet).  Don't get me wrong, I am not trying
  4029. to start a flame war here, I just think that Frontier, given its evolution, is
  4030. higher on the food chain when it comes to really getting a script written,
  4031. debugged, and working.
  4032.  
  4033. If you look at the Frontier side, they did not charge for the 1.0 to 2.0 and
  4034. they now charge a little for the 2.0 to 3.0, it may add up to a discounted
  4035. 495.00 list maybe?  Does anyone know what the discounted price for Frontier is
  4036. now?
  4037.  
  4038. If you take a look at AppleScript, I bought it at 1.0, then paid to upgrade to
  4039. 1.1, and I still need to buy a good debugger.  I would like to make a humble 
  4040. and
  4041. simple comparison here:
  4042. When Apple released Quicktime, they shipped it with the Simple Player, they did
  4043. not ship it with Adobe's Premiere.  Needless to say that until Premiere came
  4044. out, you really could not do any development on it.
  4045. Given that, when Apple released AppleScript, they shipped it with the
  4046. ScriptEditor, they did not ship it with _development_system. (I live in my
  4047. debugger).
  4048. So, now I need to buy one, but, there are none out yet on the market, and when
  4049. the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
  4050. 1.0).
  4051.  
  4052. OK, so here is what Apple script is going to cost me for the same type of
  4053. development tools that I have on Frontier 3.0.
  4054. Apple 1.0           $199.00
  4055. upgrade to 1.1      $ 99.00
  4056. Scriptor 1.0        $249.00
  4057.  
  4058. Not to mention the fact that development on a 1.0 version make me nervous if I
  4059. have a deadline.
  4060.  
  4061. Again, I am not complaining about anything, I really love both of them, I just
  4062. wish that the AppleScript side of this would catch up quicker.
  4063.  
  4064. --Tim Keanini    blast@crl.com
  4065. ps I personally would still buy Frontier at that price, it would just have 
  4066. taken
  4067. me longer to save up.:-)
  4068. =========================================================================
  4069. Date:         Thu, 14 Apr 1994 11:39:29 -0400
  4070. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4071. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4072. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  4073. Subject:      Re: OSA Menu
  4074. In-Reply-To:  <no.id> from "Matthew Ahrens" at Apr 14, 94 10:32:01 am
  4075.  
  4076. --Matthew Ahrens wrote:
  4077. >
  4078. >I have a script that does an operation on the finder selection, and it runs
  4079. >find from the script editor, but it would be a lot more useful if i could run
  4080. >it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
  4081. >it gives me an error of -1762. What does this mean, and how can i fix it?
  4082.  
  4083.     Sounds like you might need to increase your Finder memory. If you
  4084. have ResEdit you should make a copy of your Finder, open it up; open up
  4085. the SIZE resource and double-click on the -1. Scroll to bottom and
  4086. increase the highlighed number. The normal setting is 155k. I have mine
  4087. set to 1MB, but 512k is probably good enough.
  4088.  
  4089. -Hades
  4090. =========================================================================
  4091. Date:         Thu, 14 Apr 1994 11:21:25 -0700
  4092. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4093. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4094. From:         "Erik C. Thauvin" <ravensys@ESKIMO.COM>
  4095. Subject:      Re: Frontier price increased to $495???
  4096. In-Reply-To:  <199404141417.AA23677@eskimo.com>
  4097.  
  4098. On Thu, 14 Apr 1994, David Myers wrote:
  4099.  
  4100. > The newest MacWeek has a comparison between UserLand Frontier and
  4101. > AppleScript.  The review was balanced overall in my opinion, but one
  4102. > item really caught me by surprise.  Apparently, UserLand has increased
  4103. > the price to $495!  I'm glad I've already bought it, because I never
  4104. > would have paid that much for it.  Putting aside questions of whether
  4105. > it is "worth it" or not, I simply could not have afforded it.
  4106. >  Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4107. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4108. From:         Tim Bates <timothy@BIO.AUCKLAND.AC.NZ>
  4109. Organization: University of Auckland, New Zealand
  4110. Subject:      admin- help needed in signi
  4111.  
  4112.         Reply to:   admin: help needed in signing off
  4113. Hi,
  4114. I have tried signing off under all the accounts I know of, however
  4115. I remain connected and persona non grata. I initially subscribed to
  4116. frontier if that helps.
  4117.  
  4118. Could you please disconnect someone called <timothy bates>. It
  4119. is probably me ;-)
  4120.  
  4121. thanks very much
  4122. tim bates
  4123. =========================================================================
  4124. Date:         Thu, 14 Apr 1994 21:14:06 EST
  4125. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4126. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4127. From:         INRA000 <INRA@MUSICB.MCGILL.CA>
  4128. Subject:      Need beta testers for File Tracker.
  4129.  
  4130. Greetings Netters,
  4131.  
  4132.     I'm finishing a long-running project of mine and am looking for a (few)
  4133. beta testers to put my final product through the grinder before it gets
  4134. released. I'm posting my request to the MacScripting list because this
  4135. product has quite a bit to do with AppleScript or any other OSA-compliant
  4136. scripting language. The program's final name will be File Tracker.
  4137.  
  4138.     This program is what would now be called an "improved Folder Watcher"
  4139. although development was started long before that program was released. In
  4140. a nutshell, File Tracker can "watch" files or folders on your hard drive
  4141. or someone else's over a network, and take action when changes are detected.
  4142. The clincher is that File Tracker builds an internal image of watched folders
  4143. which it uses to detect exactly *what* occured when a change is detected. In
  4144. this way, you can set File Tracker up to take a specific action, say opening
  4145. the involved items, when files *arrive* in a folder, but a completely different
  4146. action if files are *modified* within the folder. In all cases, File Tracker
  4147. can pinpoint the files or subfolders involved.
  4148.  
  4149.     File Tracker detects just about any conceivable occurance involving files
  4150. or folders, including the ability to scan for files not modified for a certain
  4151. length of time. File Tracker works best with AppleScript, but includes a
  4152. built-in set of actions that include the ability to mount and unmount network
  4153. volumes automatically, move, open, alias or copy files, and file detailed
  4154. reports. File Tracker can intelligently backlog files if they are busy or if
  4155. some other condition prevents them from being processed immediately. For
  4156. example, File Tracker will wait for a download to be complete before attempting
  4157. to decompress an item, or will wait for enough memory to be available before
  4158. opening an item with an application that is not running.
  4159.  
  4160.     File Tracker will be shareware $15US. The distributable program is fully
  4161. functional -- no crippleware or annoying messages. (Although there's an
  4162. Easter Egg for registered users). :-)
  4163.  
  4164.     I'm looking for people with an interesting application for File Tracker
  4165. to give it a test run in the real world to shake loose any problems I may
  4166. have overlooked in my own testing. Ideally, testers should be interested in
  4167. using both the built-in set of actions as well as AppleScript for processing,
  4168. since that will give the program the most thorough work-out.
  4169.  
  4170.     If you're interested in beta-testing File Tracker, drop me a line. I
  4171. can't offer you anything more than a free registered copy of the final product,
  4172. immortality in the form of your name in the about box, and my thanks, but
  4173. hey -- you will have helped polish a shareware product. :-) I'm planning to
  4174. start the beta test period on Monday -- people chosen as beta sites will
  4175. receive the full distribution package then. I would like it if people wishing
  4176. to beta-test File Tracker had a debugger (ex: MacsBug) installed on their
  4177. machine, since it makes bug reports so much easier.
  4178.  
  4179.     Everyone else, hang in there. File Tracker has been a long time in
  4180. development, and I'm pretty confident that I've nailed everything in my own
  4181. evaluations. With any luck, the beta period shouldn't be very long.
  4182.  
  4183.     Cheers,
  4184.  
  4185.     Mark Aiken
  4186.     inra@musicb.mcgill.ca
  4187. =========================================================================
  4188. Date:         Fri, 15 Apr 1994 00:25:42 -0400
  4189. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4190. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4191. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  4192. Subject:      Re: Frontier price increased to $495???
  4193.  
  4194. At 10:31 AM 4/14/94 -0400, Luis Muench wrote:
  4195. >Whoa, dude!  $495.00.  Sheesh!  I think its time someone (who can) should
  4196. >create a "Bare-Bones" scripting environment for us po'folk on the net.  I
  4197. >WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
  4198.  
  4199. I think Tickle is has a Scripting component as part of it, and is able to
  4200. use the various osaxen and the like.  However, I think you need to have
  4201. AppleScript to get the other parts (like Apple Event Manager, and the OSA
  4202. stuff)
  4203.  
  4204. I pulled tickle off gaea, and plan to get to playing with it eventually.
  4205. It seems to be quite useful to people I know who use it under UNIX.
  4206.  
  4207. Bob
  4208.  
  4209. --
  4210. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  4211. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  4212.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  4213. =========================================================================
  4214. Date:         Fri, 15 Apr 1994 00:01:20 -0700
  4215. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4216. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4217. From:         Jon Pugh <jonpugh@NETCOM.COM>
  4218. Subject:      5 Answers
  4219.  
  4220. ITEM 1:
  4221. >Any given data parameter that is passed to a scripting addition is first
  4222. >targeted down to a specific apple-event to the addition. Then, the data is
  4223. >stuffed into an apple-event descriptor that fits the data format specified
  4224. >in the scripting addition's aete. During this time, no coercion of the data
  4225. >takes place (unless the 'as xxxxx' syntax is used); the data is passed
  4226. >as-is, with the actual type of the data being a part of the above
  4227. >descriptor.
  4228.  
  4229. This is not entirely correct.  The data type in the aete is purely there
  4230. for the user.  AppleScript doesn't use it for anything.  All it uses are
  4231. the parameters and it doesn't even make sure that you supply all the
  4232. required ones.  Your event handler has to do that.  Thus, you are correct
  4233. in stating that the data is passed as-is.
  4234.  
  4235. >It is actually the addition that performs/requests coercions, when it pulls
  4236. >the info out of the appleevent...the data may be in any form before the
  4237. >coercion takes place, with the assumption being the data is convertible. So
  4238. >if testaddition takes a long as a parameter, but is passed a string like
  4239. >"15542", the text string "15542" is passed with its type as typeText.
  4240.  
  4241. This is entirely correct and very important in AppleScript/AE.
  4242.  
  4243. ITEM 2:
  4244. >Can anybody tell me why the following piece of code:
  4245. >
  4246. >set fd to open for access {file destinationFile}
  4247. >set theText to read fd from 1 to -1 as text
  4248. >close access fd
  4249. >display dialog theText
  4250. >
  4251. >works when destinationFile is a real file (in this case, created by
  4252. >TeachText), but does not work when it is an alias to the same real file
  4253. >(such as created by "Make Alias" from the File menu or by "symlink" in
  4254. >MacPerl).  In the case when destinationFile is an alias, I get an "End of
  4255. >file error".  Note that I get the same behavior when the first line reads:
  4256. >
  4257. >set fd to open for access {alias destinationFile}
  4258. >
  4259. >I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
  4260. >Finder aliases were like Unix symbolic links.
  4261.  
  4262. Not quite.  There is still application support required for dealing with
  4263. aliases, but the system manages to hide it from most apps.  Notably, when
  4264. dropping a file on another, the alias is resolved first.  Also, when an
  4265. alias is chosen in the standard file dialogs, the alias is resolved (try
  4266. option clicking on an alias in the standard file dialog).
  4267.  
  4268. The File Commands osax forgot to resolve aliases.  I'll report it as a bug.
  4269.  
  4270. ITEM 3:
  4271. >>Is anyone having problems with this osax?  When I use it to try and move a
  4272. >>folder on a network-mounted volume to the trash, I get a dialog stating that
  4273. >>the folder already exists there and do I want to replace the existing one.
  4274.  
  4275. Yeah, there's something broken in that script.  I forget what, but it
  4276. relates to the fact that network volumes don't always have trash folders.
  4277. If they are write protected a certain way then you can't put things in the
  4278. trash.  If you try it from the Finder you'll probably get a message saying
  4279. something like "File can't be put in the trash, delete it immediately?"
  4280.  
  4281. If you can't afford to delete it immediately, then make a copy somewhere
  4282. you _can_ write to, like the boot volume's trash, and then delete the file.
  4283.  
  4284. ITEM 4:
  4285. >    Sounds like you might need to increase your Finder memory. If you
  4286. >have ResEdit you should make a copy of your Finder, open it up; open up
  4287. >the SIZE resource and double-click on the -1. Scroll to bottom and
  4288. >increase the highlighed number. The normal setting is 155k. I have mine
  4289. >set to 1MB, but 512k is probably good enough.
  4290.  
  4291. Actually, about 300K is plenty.  You can probably get away with less too.
  4292.  
  4293. The best thing is to bug Leonard (leonardr@netcom.com) to finish version
  4294. 1.0.1 of OSA Menu which fixes these memory problems.  ;)
  4295.  
  4296. ITEM 5:
  4297. >        Since I have no way of generating these compiled scripts, I was
  4298. >wondering if anyone would know where there may be compiled scripts one
  4299. >could download and use.  I would be particularly interested in any kind of
  4300. >finder scripts.
  4301.  
  4302. Compiled scripts won't help.  You need AppleScript.  OSA Menu isn't enough.
  4303. If you have AppleScript then you have the Script Editor and you _can_
  4304. compile scripts.  Of course, learning how is why this list was created.  ;)
  4305.  
  4306. Sorry about rolling all of this into one response, but hey, tough.  ;)
  4307.  
  4308. Jon
  4309. =========================================================================
  4310. Date:         Fri, 15 Apr 1994 10:20:28 +0100
  4311. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4312. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4313. From:         Johan Solve <johan.solve@ITN.HH.SE>
  4314. Subject:      AppleScript speed (or slowness)
  4315.  
  4316. I'm generally disappointed with the speed of AppleScript when it comes to
  4317. cooperation with different applications.
  4318.  
  4319. For example, I have one script that calculates the median value (the middle
  4320. value in a series) in a FileMaker database. After the database is sorted,
  4321. it takes up to 15 seconds before I get the respons. The script itself can't
  4322. be so slow, it has to be the AppleEvent traffic that is the bottleneck.
  4323.  
  4324. I have another script that sorts my Eudora mail into different mailboxes.
  4325. It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
  4326. one single message. I don't think that the script itself is slow, there is
  4327. nothing strange with it, besides perhaps the try statement.
  4328.  
  4329. My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  4330. itself (I still use 1.0, waiting for the Goodman update...).
  4331. I'm running a IIvx with 7.1.
  4332.  
  4333.  
  4334. What are your opinions or suggestions when it comes to AppleScript speed
  4335. when cooperating with applications? Is it a general rule to bring
  4336. AppleEvent calls to a minimum? For example, the sort mail script could
  4337. perhaps fetch the entire header in one AE call (don't know if Eudora
  4338. supports this), and process the information further within AppleScript. Am
  4339. I correct?
  4340.  
  4341.  
  4342. Here are the scripts, if anyone suspects them for poor performance.
  4343. Comments are welcome.
  4344. Wrapped lines end with --
  4345.  
  4346.  
  4347. Script for median value in FileMaker :
  4348. ---------
  4349. tell application "FileMaker Pro"
  4350.     activate
  4351.     Sort by Field "month salary" of Layout "form" of Database "Salaries"
  4352.     set n to Record Count
  4353. end tell
  4354. set median to midvalue(1, n)
  4355. set undkvart to midvalue(1, (round (n / 2) rounding up))
  4356. set uppkvart to midvalue(((round (n / 2) rounding down) + 1), n)
  4357. tell application "FileMaker Pro"
  4358.     display dialog "Median:   " & median & " kr" & return & return --
  4359.         & "Lower quarter:   " & undkvart & " kr" & return --
  4360.         & "Upper quarter:     " & uppkvart & " kr" buttons {"OK"} default --
  4361.         button "OK"
  4362. end tell
  4363.  
  4364. on midvalue(firstrecord, lastrecord)
  4365.     set n to lastrecord - (firstrecord - 1)
  4366.     set m to firstrecord - 1 + (round n / 2 rounding down)
  4367.     tell application "FileMaker Pro"
  4368.         set a to Get Data of Cell "month salary" of Record m of --
  4369.         Layout "form" of Database "Salaries"
  4370.         set b to Get Data of Cell "month salary" of Record (m + 1) of --
  4371.         Layout "form" of Database "Salaries"
  4372.         if n / 2 = (round n / 2) then
  4373.             set median to round (a + b) / 2
  4374.         else
  4375.             set median to round (b + 0)
  4376.         end if
  4377.     end tell
  4378.     return median
  4379. end midvalue
  4380. ---------
  4381.  
  4382.  
  4383.  
  4384. Eudora sort mail script:
  4385. ---------
  4386. tell application "Eudora1.4.2"
  4387.     --activate  -- disabled, faster if script is in foreground ?
  4388.     set n to number of message of mailbox "In" of mail folder ""
  4389.     set i to 1 -- use separate counter since the pointer should only
  4390.                -- increase if we don't move a message
  4391.     repeat with j from 1 to n
  4392.         try
  4393.             set itsTo to field "To" of message i of mailbox "In" of --
  4394.             mail folder ""
  4395.         on error
  4396.             set itsTo to ""
  4397.         end try
  4398.         try
  4399.             set itsCC to field "cc" of message i of mailbox "In" of --
  4400.             mail folder ""
  4401.         on error
  4402.             set itsCC to ""
  4403.         end try
  4404.         try
  4405.             set itssender to field "sender" of message i of mailbox --
  4406.             "In" of mail folder ""
  4407.         on error
  4408.             set itssender to ""
  4409.         end try
  4410.         set itsTo to itsTo & return & itsCC & return & itssender
  4411.         if itsTo contains "applescript%" or itsTo contains --
  4412.         "MACSCRPT%" then
  4413.             move message i of mailbox "In" of mail folder "" --
  4414.             inserthere end of mailbox "AppleScript" of mail folder ""
  4415.         else if itsTo contains "YACHT-L%" then
  4416.             move message i of mailbox "In" of mail folder "" --
  4417.             inserthere end of mailbox "yacht and sail" of mail folder ""
  4418.         else if itsTo contains "FMPRO-L%" then
  4419.             move message i of mailbox "In" of mail folder "" --
  4420.             inserthere end of mailbox "FileMaker Pro" of mail folder ""
  4421.         else if itsTo contains "info-mac digest" then
  4422.             move message i of mailbox "In" of mail folder "" --
  4423.             inserthere end of mailbox "info-mac digest" of mail folder ""
  4424.         else
  4425.             set i to i + 1 -- no message moved, increase pointer
  4426.             if i > number of message of mailbox "In" of mail folder --
  4427.             "" then exit repeat -- moved all messages already
  4428.         end if
  4429.     end repeat
  4430. end tell
  4431. play sound "doorbell"
  4432. ---------
  4433.  
  4434. _______________________________________________________________________
  4435.           "
  4436.    JOHAN SOLVE                   Department of Science and Technology
  4437.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  4438. =========================================================================
  4439. Date:         Fri, 15 Apr 1994 03:57:15 -0800
  4440. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4441. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4442. From:         Christopher Allen <consensus@NETCOM.COM>
  4443. Organization: Consensus Development Corporation, San Francisco, CA USA
  4444. Subject:      Re: AppleScript speed (or slowness)
  4445.  
  4446. At 10:20 AM 4/15/94 +0100, Johan Solve wrote:
  4447. >I have another script that sorts my Eudora mail into different mailboxes.
  4448. >It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
  4449. >one single message. I don't think that the script itself is slow, there is
  4450. >nothing strange with it, besides perhaps the try statement.
  4451.  
  4452. I use Eudora 2.0.2, which has filtering built in for the function you are
  4453. trying to script. I find it FANTASTIC, as I deal with 300+ mail messages a
  4454. day.
  4455.  
  4456. I am looking to do more scripting with Eudora, but personally not put a
  4457. whole lot of effort into writing a script to do filtering unless you needed
  4458. something the standard filters did not.
  4459.  
  4460. One thing that I've got on a sideburner for Eudora scripting is an email
  4461. exploder/digest maker, but I suspect that I'll have to wait for a future
  4462. version of Eudora with a few more features to get it working.
  4463.  
  4464. ------------------------------------------------------------------------
  4465. ..Christopher Allen                  Consensus Development Corporation..
  4466. ..<consensus@netcom.com>                         4104-24th Street #419..
  4467. ..                                        San Francisco, CA 94114-3615..
  4468. ..                                        o415/647-6383  f415/647-6384..
  4469. ..Mosaic/World-Wide-Web Front Door:                                   ..
  4470. ..ftp://netcom7.netcom.com/pub/consensus/www/ConsensusFrontDoor.html  ..
  4471. =========================================================================
  4472. Date:         Fri, 15 Apr 1994 08:05:00 -0400
  4473. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4474. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4475. From:         Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
  4476. Subject:      Re: Need beta testers for File Tracker.
  4477.  
  4478. >Greetings Netters,
  4479. >
  4480. >    I'm finishing a long-running project of mine and am looking for a (few)
  4481. >beta testers to put my final product through the grinder before it gets
  4482. >released. I'm posting my request to the MacScripting list because this
  4483. >product has quite a bit to do with AppleScript or any other OSA-compliant
  4484. >scripting language. The program's final name will be File Tracker.
  4485. >
  4486. We run an info system for K-12 education here in Georgia.  Hundreds of
  4487. files are being added, deleted or modified each day by our staff and the
  4488. 10K+ members of the system.  File Tracker looks like something that we
  4489. could very well "grind" rather vigorously.
  4490.  
  4491. Please count us in on your beta test.
  4492. =========================================================================
  4493. Date:         Fri, 15 Apr 1994 06:55:00 PDT
  4494. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4495. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4496. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  4497. Subject:      Re: Frontier price == $495???
  4498.  
  4499. > Given that, when Apple released AppleScript, they shipped it with the
  4500. > ScriptEditor, they did not ship it with _development_system. (I live in my
  4501. > debugger).
  4502. > So, now I need to buy one, but, there are none out yet on the market, and 
  4503. when
  4504. > the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
  4505. > 1.0).
  4506. >
  4507. > OK, so here is what Apple script is going to cost me for the same type of
  4508. > development tools that I have on Frontier 3.0.
  4509. > Apple 1.0           $199.00
  4510. > upgrade to 1.1      $ 99.00
  4511. > Scriptor 1.0        $249.00
  4512.  
  4513. So...  what would you consider a *better* AppleScript release?
  4514.  
  4515. What I'm readying (Beta in May) is a product which contains a AppleScript
  4516. editing (find & replace, improved dictionary, etc) and debugging (single
  4517. step, break points, variable watching) environment, a copy of my Scheduler
  4518. utility and an expanded version of my Script Tools package.  I'm also
  4519. considering bundling AppleScript 1.1 with the software.
  4520.  
  4521. All of these items together, makes (I feel) AppleScript a really functional
  4522. and appealing product.
  4523.  
  4524. -Mark
  4525. =========================================================================
  4526. Date:         Fri, 15 Apr 1994 09:00:22 -0500
  4527. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4528. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4529. From:         Fred Terry <pfterry@LKS.CSI.COM>
  4530. Subject:      Re: admin- help needed in signi
  4531. In-Reply-To:  Your message of "Fri, 15 Apr 94 10:20:22 +1100"
  4532.  
  4533. >I have tried signing off under all the accounts I know of, however
  4534. >I remain connected and persona non grata. I initially subscribed to
  4535. >frontier if that helps.
  4536. >
  4537. >Could you please disconnect someone called <timothy bates>. It
  4538. >is probably me ;-)
  4539.  
  4540.  
  4541. I've sent the message. You should receive notification pretty soon. Let me
  4542. know if you are still getting messages.
  4543.  
  4544. pf
  4545.  
  4546.  
  4547. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4548. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  4549. =========================================================================
  4550. Date:         Fri, 15 Apr 1994 07:05:59 -0800
  4551. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4552. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4553. From:         Robert Mark <rmark@ISDMNL.WR.USGS.GOV>
  4554. Subject:      Re: AppleScript speed (or slowness)
  4555.  
  4556. >I'm generally disappointed with the speed of AppleScript when it comes to
  4557. >cooperation with different applications.
  4558. >
  4559. >For example, I have one script that calculates the median value (the middle
  4560. >value in a series) in a FileMaker database. After the database is sorted,
  4561. >it takes up to 15 seconds before I get the respons. The script itself can't
  4562. >be so slow, it has to be the AppleEvent traffic that is the bottleneck.
  4563. >
  4564. An Applescript initiated search for records in FileMaker Pro takes about 2
  4565. orders of magnitude longer than the same search initiated in FileMaker.
  4566.  
  4567. tell application "FileMaker Pro"
  4568.   show records (where cell 1 = "string")  --VERY SLOW!!
  4569. end tell
  4570. =========================================================================
  4571. Date:         Fri, 15 Apr 1994 10:56:00 -0400
  4572. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4573. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4574. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  4575. From:         ab026@FREENET.CARLETON.CA
  4576. Subject:      Re: Menu Events, Menu Grabber,
  4577.  
  4578. [deleted preceding conversation about ways to selectively plug the
  4579. intentional security hole in the Menu Events extension]
  4580.  
  4581. > 3.  Use a particular application's Sharing dialog to turn off remote
  4582. >     program linking (does this work on 7.1.2's Finder?); or
  4583. >
  4584. >What was thaat again.....
  4585. >
  4586. > 4.  Lock the Menu Events extension file (startup icon will reflect
  4587. >     change), so that only applications running in kAEInteractWithAll
  4588. >     mode will accept a Select Menu Item event from a remote sender.
  4589. >     I doubt there are many non-scriptable applications which choose
  4590. >     run in this mode, or which let you select this mode through GUI.
  4591. >     kAEInteractWithLocal is the default, and Menu Events cleverly
  4592. >     overrides that setting if you don't lock it - hence the hole!
  4593. >
  4594. >Hmmm.. I have to try this, and see what happens. Its interestin to
  4595. >see how it overrides that setting of any appl, even if the appl is
  4596. >locked, when the menu events extnsn ain't locked.
  4597.  
  4598. Each application has a bit in its 'SIZE' resource which allows or
  4599. disallows remote program linking.  If it's off, the program isn't
  4600. visible through PPC Toolbox across the network, so no Menu events.
  4601. This is the way to "lock" an application against remote senders.
  4602. If the application is visible, and Menu Events isn't locked, then
  4603. the extension won't respect the default kAEInteractWithLocal user
  4604. interaction restriction.
  4605.  
  4606. >But as i said before, menu events is still kewl, it is just its
  4607. >spokesman who ain't. :-)))))
  4608. >
  4609. >__ __
  4610. >Marilyn Monroe
  4611. >Bring Back the Goddess Inc.
  4612.  
  4613. Fella, if you're so cool, you can do without the pseudonym.
  4614.  
  4615. Ross Brown - AWOL Software Productions
  4616. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  4617. publisher of AWOL Utilities - "the best deal in freeware!"
  4618. ab026@freenet.carleton.ca
  4619. =========================================================================
  4620. Date:         Fri, 15 Apr 1994 11:27:50 -0500
  4621. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4622. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4623. From:         Steve Abrams <stevea@CS.UMD.EDU>
  4624. Subject:      Re: Need beta testers for File Tracker.
  4625.  
  4626. Mark,
  4627.  
  4628. If you're still looking for beta testers, I'd like to give it a try.  Part of 
  4629. my
  4630. job is to oversee the administrative staff of the Computer Science department
  4631. here.  I am particularly interested in FileTracker's ability to watch file
  4632. activities over the network to assist in troubleshooting (computer-illiterate
  4633. users can rarely accurately recount to me what they were doing prior to a crash
  4634. or freeze...this would add one more set of data points ... sometimes I wish 
  4635. Macs
  4636. would dump core just once <grin>).
  4637.  
  4638. Steve Abrams, Systems Programmer       E: t be found"
  4639.  
  4640. First, is there an alternate source for the AppleScriptLib, other than the
  4641. AppleScript distribution itself? And, does anyone know Apple's policy
  4642. regarding the distribution of this library?
  4643.  
  4644. Second, is there some overlooked programming technique that I should use on
  4645. the PPC to indicate that a particular shared libary isn't mandatory and the
  4646. program should be allowed to run if it isn't present?
  4647.  
  4648. Thanks,
  4649. Chuck
  4650.  
  4651. p.s. Please CC: me on any responses.
  4652.  
  4653. --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  4654. Chuck Shotton                             \
  4655. Assistant Director, Academic Computing     \   "Shut up and eat your
  4656. U. of Texas Health Science Center Houston   \    vegetables!!!"
  4657. cshotton@oac.hsc.uth.tmc.edu  (713) 794-5650 \
  4658. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
  4659. =========================================================================
  4660. Date:         Fri, 15 Apr 1994 14:27:41 -0500
  4661. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4662. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4663. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  4664. Subject:      Re: Menu Events, Menu Grabber,
  4665.  
  4666.         [ Techy stuff well taken, hence not reproduced ]
  4667.         [ Apologies for others, for leadin 'em away from ASing]
  4668.  
  4669.  Fella, if you're so cool, you can do without the pseudonym.
  4670.  
  4671. Listen buddy, if your'e trying to start a flamewar, lets do it
  4672. on an another platform, lets keep this forum just for ASing
  4673. the way the manufacturer intended it to be used. :)
  4674.  
  4675. I 'am still amazed that your'e flaming me just for pointing
  4676. out the bug in your program. I take it sportingly when userz
  4677. point out bugz in my programz. Infact 'am better I fix 'em up.
  4678.  
  4679. Have a good weeknd.
  4680.  
  4681. --
  4682. Marilyn Monroe
  4683. Bring Back the Goddess Inc.
  4684.  
  4685. Don't tell me later that folks in Temple think the same way
  4686. folks in Heaven do.
  4687. =========================================================================
  4688. Date:         Fri, 15 Apr 1994 14:42:37 -0400
  4689. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4690. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4691. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  4692. Subject:      Re: What's with quiting?
  4693. In-Reply-To:  <no.id> from "Stephen Jonke" at Apr 15, 94 01:13:28 pm
  4694.  
  4695. --Stephen Jonke wrote:
  4696. >
  4697. >  tell application "Scriptable Text Editor"
  4698. >      quit
  4699. >  end tell
  4700. >
  4701. >I get an error reading:, "some parameter wasn't understood", highlighting
  4702. >the quit command.  What's wrong with this?
  4703.  
  4704.     You might need to say, "quit saving no" to get the STE to quit from
  4705. a tell statement. Personally, as long as you know that there are no
  4706. windows open, or anything that might need to be saved you could just
  4707. issue a: quit application "Scriptable Text Editor". This command has the
  4708. advantage that it will work with any running application.
  4709.  
  4710. -Hades
  4711. =========================================================================
  4712. Date:         Fri, 15 Apr 1994 14:44:52 -0400
  4713. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4714. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4715. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  4716. Subject:      Re: Menu Events, Menu Grabber,
  4717. In-Reply-To:  <no.id> from "The Goddess Lives" at Apr 15, 94 02:27:41 pm
  4718.  
  4719. --The Goddess Lives wrote:
  4720. >
  4721. >Listen buddy, if your'e trying to start a flamewar, lets do it
  4722. >on an another platform, lets keep this forum just for ASing
  4723. >the way the manufacturer intended it to be used. :)
  4724.  
  4725.     One small point. This mainling list exists for the discussion of any
  4726. and all OSA or AppleScript compliant scripting systems. Not just
  4727. AppleScript. As it happens, AppleScript is currently the most talked
  4728. about environment on the list.
  4729.  
  4730. -Hades
  4731. =========================================================================
  4732. Date:         Fri, 15 Apr 1994 13:52:10 -0500
  4733. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4734. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4735. From:         Fred Terry <pfterry@LKS.CSI.COM>
  4736. Subject:      Re: Menu Events, Menu Grabber,
  4737. In-Reply-To:  Your message of "Fri, 15 Apr 94 10:56:00 EDT"
  4738.  
  4739. Ross,
  4740.  
  4741. >Fella, if you're so cool, you can do without the pseudonym.
  4742. >
  4743. >Ross Brown - AWOL Software Productions
  4744. >PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  4745. >publisher of AWOL Utilities - "the best deal in freeware!"
  4746. >ab026@freenet.carleton.ca
  4747.  
  4748. I appreciate the time that you took to answer this person's questions. And I'm
  4749. also sensitive to the tone he/she used. Please, please don't respond to
  4750. his/her latest message in the list. I've sent a message to the individual
  4751. asking them to cease the flammage, and I'd appreciate your help (even though
  4752. your comment isn't so bad and I "slightly" agree with you). I really don't
  4753. want this stuff in the list. Period.
  4754.  
  4755. Thanks for your understanding.
  4756.  
  4757. pf
  4758.  
  4759.  
  4760. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4761. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  4762. =========================================================================
  4763. Date:         Fri, 15 Apr 1994 15:54:19 -0400
  4764. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4765. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4766. From:         Stephen Jonke <jonke@KONG.GSFC.NASA.GOV>
  4767. Subject:      [ignore] A bit of a test
  4768.  
  4769. Sorry if this annoys anybody....  I've been having problems with bounced
  4770. messages on this list (namely, my admin complains about bounced
  4771. acknowledgement messages), so I set my options to "NOACK" and am hoping
  4772. that I won't receive an "ACK".  The last time I tried this it didn't seem
  4773. to stop the "ACK"'s  :)
  4774.  
  4775. Actually, I suppose I could throw in a question - is there any way in
  4776. AppleScript to pause for x seconds (or milliseconds or whatever)?  Using
  4777. repeat loops seems to be rather unreliable.  Sometimes an empty loop for
  4778. 10000 times finishes almost immediately, other times it takes several
  4779. seconds!
  4780.  
  4781. Steve
  4782.  
  4783. ---------------------
  4784.  jonke@gsfc.nasa.gov
  4785. ---------------------
  4786. =========================================================================
  4787. Date:         Fri, 15 Apr 1994 15:17:20 -0500
  4788. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4789. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4790. From:         Igor Livshits <igorl@UIUC.EDU>
  4791. Subject:      Re: Putting stuff on the clipboard?
  4792.  
  4793. >>Simple question, is there any way to place text (or whatever) into the
  4794. >>clipboard?
  4795. >
  4796.  
  4797. Menu Events 1.1.1 -- you could send a fake copy command (perhaps preceded
  4798. with a select all command].
  4799.  
  4800. Cheers, Igor
  4801.  
  4802. _____
  4803. NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424;  Have a Coke and a smile :)
  4804. =========================================================================
  4805. Date:         Fri, 15 Apr 1994 16:50:29 -0500
  4806. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4807. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4808. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  4809. Subject:      FrontMost Crash
  4810.  
  4811. Hello,
  4812.  
  4813.  A while ago I posted a problem I was having with having a client
  4814. AppleScript tell FrontMost to do something. ( The full posting is at the
  4815. bottom of this e-mail. ) I also posted this AppleLink and got a speedy
  4816. reply from Uncle Dave of SDU. He was able to reproduce the problem and said
  4817. it was a bug. Below is his work around:
  4818.  
  4819. ===========================================
  4820. SDU's reply
  4821. =================================================
  4822.  
  4823. Hello:
  4824.  
  4825. We are working on the problem.
  4826.  
  4827. Please use this code in the meantime:
  4828.  
  4829. on AddFile(theFile)
  4830.    open window "Files To Get"
  4831.    tell window "Files to Get"
  4832.    copy the contents of listbox "File List" to stuff
  4833.    copy stuff & {theFile} to the contents of listbox "File List"
  4834.    end tell
  4835. end AddFile
  4836.  
  4837. Thanks,
  4838. Uncle Dave
  4839.  
  4840. Author: LEE.BUCK
  4841.  
  4842. =================================================
  4843. Original post
  4844. =================================================
  4845.  
  4846. Hello,
  4847.  
  4848.  I am writing a simple test client-server system where the client is a an
  4849. AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
  4850. app.  The problem I am having is that when the FaceSpan command "make new
  4851. listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes  )
  4852. or drops down into MacsBug. It is not consistent.
  4853.  
  4854.  I have tried all kinds of things:
  4855.  
  4856.     I am only using the extensions I need.
  4857.     I have tried  saving the FaceSpan app as a complete app or a mini app.
  4858.     I wrapped a try-error handler around the troublemaker line.
  4859.  
  4860. When I call the "AddFile"  handler from within the Server app itself it
  4861. works fine, but when I call the handler from a client script,  I get the
  4862. hang.
  4863.  
  4864.  I don't know what to try next.  Anybody out there experience this type of
  4865. problem? I have not seen too much discussion of FrontMost on this list. I
  4866. hope it is OK to ask this type of question here.
  4867.  
  4868. ========
  4869.  
  4870. Here are the scripts that make up the system. I cut out all the other
  4871. stuff. This code still bombs. By the way I am running System 7 Pro on an
  4872. fx.
  4873.  
  4874.  Thanks.
  4875.  
  4876.  
  4877. Client Script
  4878. -----------------
  4879. tell application "Server"
  4880.         activate
  4881.         AddFile("junk")
  4882.         activate current application
  4883. end tell
  4884.  
  4885.  
  4886. "Server Script" in FrontMost Project Script
  4887. ---------------------------------------------------------
  4888. on AddFile(theFile)
  4889.       open window "Files To Get"
  4890.       set theListBox to listbox "File List" of window "Files To Get"
  4891.      -- I have a valid reference here. I checked using display dialog.
  4892.       make new listbox item at end of theListBox with properties
  4893. {contents:"junk"}
  4894. end AddFile
  4895.  
  4896.  
  4897. --
  4898. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  4899. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  4900. sshws@convx1.lerc.nasa.gov
  4901. AppleLink: SCHILLING.H
  4902. =========================================================================
  4903. Date:         Fri, 15 Apr 1994 18:28:30 -0600
  4904. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4905. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4906. From:         Charles Wiltgen <cwiltgen@MCS.COM>
  4907. Subject:      Re: Menu Events, Menu Grabber,
  4908.  
  4909. Ross,
  4910.  
  4911. >I appreciate the time that you took to answer this person's questions. And I'm
  4912. >also sensitive to the tone he/she used. Please, please don't respond to
  4913. >his/her latest message in the list. I've sent a message to the individual
  4914. >asking them to cease the flammage, and I'd appreciate your help (even though
  4915. >your comment isn't so bad and I "slightly" agree with you). I really don't
  4916. >want this stuff in the list. Period.
  4917.  
  4918. Fred took the words right out of my mouth.  I think a lot of people
  4919. appreciate the time you've put into your software, Ms. Monroe
  4920. notwithstanding.
  4921.  
  4922.  
  4923. --
  4924. Charles Wiltgen
  4925. MCSnet/Chicago
  4926. cwiltgen@mcs.net
  4927. =========================================================================
  4928. Date:         Fri, 15 Apr 1994 18:42:46 -0700
  4929. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4930. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4931. From:         "Allan R. Crump" <jhhw@CRL.COM>
  4932. Subject:      where is app?
  4933.  
  4934. Ok, here's my problem.
  4935. *If I create an applet which can be run on several different machines,
  4936. every time that I install the applet and run it the first time it asks:
  4937.  
  4938. "Where is application Filemaker Pro 2.0?"
  4939.  
  4940. * If I setup a variable as follows:
  4941. copy localHardDrive & "Applications:Filemaker:Filemaker Pro 2.0" to appname
  4942. tell application appname
  4943. ...
  4944. end tell
  4945. *But the applet freaks out because it cannot resolve the events it's
  4946. supposed to send to appname.  Does anyone have any suggestions on this
  4947. one ??
  4948.  
  4949. You'd have my undying gratitude.
  4950. Allan Crump
  4951. =========================================================================
  4952. Date:         Fri, 15 Apr 1994 22:47:02 +0000
  4953. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4954. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4955. From:         Paul Sperry <sperry@MATH.SCAROLINA.EDU>
  4956. Subject:      Re: What's with quiting?
  4957.  
  4958. At  1:13 PM 4/15/94 -0400. Stephen Jonke wrote:
  4959. >Is there something non-obvious thing about how you are supposed to tell an
  4960. >application to quit?  Every time I try to do something like:
  4961. >
  4962. >  tell application "Scriptable Text Editor"
  4963. >      quit
  4964. >  end tell
  4965. >
  4966. >I get an error reading:, "some parameter wasn't understood", highlighting
  4967. >the quit command.  What's wrong with this?
  4968. >
  4969. >Steve
  4970. >
  4971. >---------------------
  4972. > jonke@gsfc.nasa.gov
  4973. >---------------------
  4974.  
  4975.    Steve is not hallucinating, I have the same problem and not just with
  4976. quit.  It occurs, as near as I can tell, completely at random: sometimes a
  4977. script works, sometimes the same one doesn't. I have tried the various
  4978. options for quit, removing all extensions except AppleScript, removing
  4979. RamDoubler and a different machine.  No luck.  I've taken to try-ing quit
  4980. at the beginning of every script to see whether it will work this time.
  4981.  
  4982.    Sometimes quitting AppleScript Editor ( I'm using 1.0 ) and then
  4983. relaunching it will fix things; sometimes even multiple machine restarts is
  4984. no help.
  4985.  
  4986. P.L.Sperry                                       sperry@math.scarolina.edu
  4987. Department of Mathematics
  4988. University of South Carolina
  4989. Columbia,SC
  4990. =========================================================================
  4991. Date:         Sat, 16 Apr 1994 11:06:13 EDT
  4992. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4993. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4994. From:         Jeff Beebe <jeffbb@AOL.COM>
  4995. Subject:      Re: What's with quiting?
  4996.  
  4997. You can be sure whether a parameter is necessary by checking the dictionary
  4998. of STE (use open dictionary in Script Editor File command).
  4999.    Your best bet before quitting is make sure all your windows are closed,
  5000. and the STE close command does have the "saving yes/no/ask" optional
  5001. parameter.
  5002. =========================================================================
  5003. Date:         Sat, 16 Apr 1994 11:11:11 EDT
  5004. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5005. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5006. From:         Jeff Beebe <jeffbb@AOL.COM>
  5007. Subject:      Re: Putting stuff on the clipboard?
  5008.  
  5009. There is an OSAX called clipboard which uses the commands "clipboard info",
  5010. "set the clipboard to", and "the clipboard" which will do what we want.
  5011.     I just got it this week from a Gannett colleage, but its from Apple, by
  5012. Jon Pugh.
  5013. =========================================================================
  5014. Date:         Sat, 16 Apr 1994 15:01:31 -0400
  5015. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5016. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5017. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  5018. Subject:      AppleScript Language Guide (Addison-Wesley)
  5019.  
  5020. As excellent as this is, I was suprised to notice the following
  5021. (sorry if this is a FAQ-ish well known thing, I just got here):
  5022.  
  5023. (*
  5024. --from AppleScript Language Guide (AW), p181
  5025. 31449600 / years
  5026. -- result: 1
  5027.  
  5028. -- actual result: Execution Error
  5029. --  The variable years is not defined
  5030. *)
  5031.  
  5032. 31449600 / weeks --result: 52.0
  5033. days * 365 -- result: 31536000
  5034. copy days * 365 to mostYears
  5035. 31449600 / mostYears -- result: 0.9972602739726
  5036. =========================================================================
  5037. Date:         Sat, 16 Apr 1994 15:04:36 -0400
  5038. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5039. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5040. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  5041. Subject:      Another dumb dates FAQ?
  5042.  
  5043. I give up. (The following script explains the problem)
  5044. (*Failing to find a definition of the domain or range
  5045. of AppleScript dates, I was curious to see if it
  5046. handled Pope Gregory's missing days. I never found
  5047. out, as something chokes in the following script
  5048. about 1902. Yet I can represent earlier dates that seem
  5049. to work ok, for example the next line entered as: date "1/1/1700" *)
  5050. date "Friday, January 1, 1700 12:00:00 AM"
  5051. -- result: as converted in the script, underlined (meaning??)
  5052.  
  5053. copy 0 to lastlen
  5054. set jan1 to date "Saturday, January 1, 1994 12:00:00 AM"
  5055. copy jan1 to nxtyr
  5056. repeat with yr from 1905 to 1000 by -1
  5057.         set year of jan1 to yr
  5058.         display dialog jan1 as string -- just to watch;wish it would take dates
  5059.         set year of nxtyr to yr + 1
  5060.         -- the next line fails for 1902 or any year earlier
  5061.         set len to (nxtyr - jan1) / days -- result: execution error
  5062.         --the result of a numeric operation was too large
  5063.         if 1 < lastlen - len then -- leap years are ok
  5064.                 display dialog (yr as string) & "=" & len & "," & yr + 1 & "=" 
  5065. &
  5066.  lastlen
  5067.         end if
  5068.         copy len to lastlen
  5069. end repeat
  5070.  
  5071. Make sense to anyone??
  5072. =========================================================================
  5073. Date:         Sun, 17 Apr 1994 17:07:03 -0700
  5074. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5075. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5076. From:         Jon Pugh <jonpugh@NETCOM.COM>
  5077. Subject:      Jon's Commands 1.1
  5078.  
  5079. I just sent Jon's Commands 1.1 to Info-Mac.  It should appear on Sumex
  5080. shortly and assuming Fred isn't asleep, on gaea shortly thereafter.
  5081.  
  5082. Version 1.1 fixes a bug in "screen list" on machines without color, a bug
  5083. in "set clipboard to", passes a clean PC register in "execute FKEY",
  5084. changes the return result of finder selection to aliases, makes all the
  5085. file commands take lists and strings, and adds copyFile and walk folders,
  5086. plus coercions from strings to file specifications.
  5087.  
  5088. The "walk folders" command is a good one.  It takes a list of files and
  5089. folders and a script object.  It then recurses through all the files and
  5090. folders and for each file in these folders, it sends an open message to the
  5091. script provided.  This makes it really simple to write file processing
  5092. scripts.  Here's an example:
  5093.  
  5094. script foo
  5095.   on open(f)
  5096.     -- do your stuff to file f here
  5097.   end open
  5098. end script
  5099.  
  5100. on open(theFiles)
  5101.   walk folders theFiles with script foo
  5102. end open
  5103.  
  5104. That's all there is to it!  I think it's cool!
  5105.  
  5106. Check it out at an archive near you (and if there isn't one, MOVE!).
  5107.  
  5108. Jon
  5109. =========================================================================
  5110. Date:         Sun, 17 Apr 1994 17:06:42 -0700
  5111. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5112. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5113. From:         Jon Pugh <jonpugh@NETCOM.COM>
  5114. Subject:      Add Dictionary Script
  5115.  
  5116. Here's a nifty script I wrote some time ago and forgot to mention.
  5117.  
  5118. If you use Leonard's OSA Menu extension and the AppleScript Script Editor
  5119. and any number of scriptable programs or scripting additions, then this
  5120. script is a "must have!"  When you drop an app or osax onto this script
  5121. (saved as an application), it adds that application or scripting addition
  5122. to the Script Editor's OSA Menu.
  5123.  
  5124. Now, when you are in the Script Editor and say "Hmmm, what was the syntax
  5125. of that command in that super-nifty osax Jon's Commands?" ;) ;) you can
  5126. simply pull down the menu and the dictionary will open.  Pretty damn handy!
  5127.  
  5128. This includes a run handler at the end which uses Jon's Commands to make
  5129. this work from the Finder's OSA Menu.  If you don't want that or don't use
  5130. Jon's Commands, remove that handler.  If you want it to work with the
  5131. scriptable Finder, change the run handler to:
  5132.         tell app "Finder"
  5133.           set x to selection
  5134.         end tell
  5135.         open x
  5136.  
  5137. Have fun!
  5138.  
  5139. Jon
  5140.  
  5141. ----------8x-------------8x-----------------8x---------------
  5142.  
  5143. script bob
  5144.         property dictFile : ""
  5145.         tell application "Script Editor"
  5146.                 open {dictFile}
  5147.         end tell
  5148. end script
  5149.  
  5150. on open (theFiles)
  5151.         repeat with f in theFiles
  5152.                 set s to bob
  5153.                 set s's dictFile to (f as alias)
  5154.                 set t to f as string
  5155.                 set AppleScript's text item delimiters to {":"}
  5156.                 set fName to last text item of t
  5157.                 set folderName to ""
  5158.                 repeat with i from 1 to (number of text items of t) - 1
  5159.                         set folderName to folderName & text item i of t & ":=
  5160. "
  5161.                 end repeat
  5162.                 set AppleScript's text item delimiters to {}
  5163.                 set additionPath to (path to extensions folder as string) --
  5164.                         & "Scripting Additions:"
  5165.                 if folderName =82 additionPath then
  5166.                         set fName to space & fName & " Dictionary"
  5167.                 else
  5168.                         set fName to fName & " Dictionary"
  5169.                 end if
  5170.                 if number of characters of fName > 31 then
  5171.                         display dialog "Shorten this name, please." --
  5172.                                 default answer fName
  5173.                         set fName to text returned of the result
  5174.                         if number of characters of fName > 31 then
  5175.                                 set fName to characters 1 through 31 of fNam=
  5176. e
  5177.                         end if
  5178.                 end if
  5179.                 set p to (path to system folder as string) & --
  5180.                         "Scripts:Script Editor Scripts:" & fName
  5181.                 --display dialog p
  5182.                 store script s in file p replacing yes
  5183.         end repeat
  5184. end open
  5185.  
  5186. on run
  5187.         open (finder selection)
  5188. end run
  5189. =========================================================================
  5190. Date:         Mon, 18 Apr 1994 08:50:45 +0100
  5191. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5192. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5193. From:         Johan Solve <johan.solve@ITN.HH.SE>
  5194. Subject:      Re: AppleScript speed (or slowness)
  5195.  
  5196.  --Brian Hughes wrote:
  5197.  
  5198. >     I don't know that much about scripting Eudora, but I do have a few
  5199. > comments and ideas on your scripts...
  5200. > >tell application "FileMaker Pro"
  5201. > >    display dialog "Median:   " & median & " kr" & return & return --
  5202. > >        & "Lower quarter:   " & undkvart & " kr" & return --
  5203. > >        & "Upper quarter:     " & uppkvart & " kr" buttons {"OK"} default --
  5204. > >        button "OK"
  5205. > >end tell
  5206. >
  5207. >     Why have you wrapped this display dialog command in a tell
  5208. > statement? You don't get or send any data from FM Pro in the display
  5209. > dialog command. This could be part of your problem right here.
  5210.  
  5211. Without the tell statement, I would expect the dialog to show up in the
  5212. script's layer instead of the FileMaker layer, resulting in an unwanted
  5213. notification. Am I right? (easy to try, haven't done it yet)
  5214.  
  5215. >
  5216. > >Eudora sort mail script:
  5217. > >---------
  5218. > >tell application "Eudora1.4.2"
  5219. >
  5220. >     You could change this to: tell mail folder "" of application ... It
  5221. > would make all of your future references a little shorter.
  5222.  
  5223. This won't let me redirect mail to different mail folders (which I do in
  5224. the actual script I use now)
  5225.  
  5226.  
  5227. > >    --activate  -- disabled, faster if script is in foreground ?
  5228. > >    set n to number of message of mailbox "In" of mail folder ""
  5229. > >    set i to 1 -- use separate counter since the pointer should only
  5230. > >               -- increase if we don't move a message
  5231. > >    repeat with j from 1 to n
  5232. >
  5233. >     Since you don't use j within the loop at all a slightly more
  5234. > efficient loop call might be "repeat n times".
  5235.  
  5236. Ah well, a leftover from a previous version of the script where j was used.
  5237. Good point!
  5238.  
  5239.  
  5240. > >   [long script snippet deleted]
  5241. > >
  5242. >         if exists message i of mailbox "In" of mail folder ""
  5243. >            tell message i of mailbox "In" of mail folder ""
  5244. >               set itsTo to field "To" & return & field "cc" & return --
  5245. >                   & field "sender"
  5246. >            end tell
  5247. >         end if
  5248. >
  5249. >     I don't think you really need all of those try statements, but I
  5250. > could be wrong. If I'm right then what I wrote makes that whole thing
  5251. > just a little bit shorter. ;->
  5252.  
  5253. Shorter, yes, but will it work? What happens if there is no cc field in the
  5254. header? I'd expect an error.
  5255. Is it possibel to fetch the entire header record in one single call, and
  5256. extract the different fields within the script? This must be MUCH faster.
  5257.  
  5258. Thanks for comments!
  5259.  
  5260. _______________________________________________________________________
  5261.           "
  5262.    JOHAN SOLVE                   Department of Science and Technology
  5263.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  5264. =========================================================================
  5265. Date:         Mon, 18 Apr 1994 11:17:45 -0400
  5266. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5267. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5268. From:         "Brian Vl numbers).
  5269. =========================================================================
  5270. Date:         Mon, 18 Apr 1994 12:32:34 -0400
  5271. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5272. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5273. From:         George Entenman <ge@MCNC.ORG>
  5274. Subject:      How to distribute AppleScript?
  5275.  
  5276. If a company develops an application that uses AppleScript, it is possible
  5277. to distribute a runtime version of AppleScript with the application?
  5278. Does the company doing this have to pay to redistribute it?
  5279.  
  5280. Thanks.
  5281.  
  5282.                           George
  5283.  
  5284. P.S. I read the articles called "AppleScript Distribution License = $500",
  5285. but they don't seem to answer this question.
  5286.  
  5287. ########################################################################
  5288. # George Entenman (ge@mcnc.org)                                        #
  5289. # MCNC Center for Microelectronics Systems Technologies                #
  5290. # P.O. Box 12889                                                       #
  5291. # Research Triangle Park, NC 27709-2889           Besta e tu'          #
  5292. # 919/248-1953 (voice)                            Se voce' na~o viver  #
  5293. # 919/248-1455 (FAX)                              neste mundo....      #
  5294. ########################################################################
  5295. =========================================================================
  5296. Date:         Mon, 18 Apr 1994 13:21:08 -0400
  5297. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5298. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5299. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  5300. Subject:      Re: AppleScript speed (or slowness)
  5301. In-Reply-To:  <no.id> from "John W. Baxter" at Apr 18, 94 09:18:28 am
  5302.  
  5303. --John W. Baxter wrote:
  5304. >
  5305. >   Perhaps the header fields are handled as they are because the set of all
  5306. >headers is unknown (unbounded?  whatever).  There are a few expected ones,
  5307. >and there can be any other ones that some foolish mailer wants to put in.
  5308. >If I want, I can have header
  5309. >    X-Today-John-Weighs: nnn
  5310. >although I shouldn't.
  5311.  
  5312.     Ok, now I feel like an idiot. Especially since I always append a
  5313. custom header to all of my mail messages. You would think I would know
  5314. that this is the case. Thanks for clearing this up John.
  5315.  
  5316. -Hades
  5317. =========================================================================
  5318. Date:         Mon, 18 Apr 1994 14:33:08 -0500
  5319. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5320. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5321. From:         Fred Terry <pfterry@LKS.CSI.COM>
  5322. Subject:      new files on gaea 4/18
  5323.  
  5324. Hi everyone,
  5325. You will find a couple of new files on gaea and a update.
  5326.  
  5327. John Baxter has contributed a couple of modern memory manager files for use
  5328. with Frontier and AppleScript. Both the osax and the UCMD detect whether the
  5329. "Modern Memory Manager" is active, returning true if it is, false if it isn't.
  5330.  Useful if one has some applications which can't tolerate the new Memory
  5331. Manager. Source code included, along with a dumb sample AppleScript script,
  5332. and the needed glue table for Frontier.
  5333.  
  5334. You will also find a new version of Acid Jazz (1.2). The URLs are
  5335.  
  5336. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/AcidJazz1.2v1.sit.hqx
  5337. ftp://gaea.kgs.ukans.edu/applescript/osaxen/modernMMosax.sit.hqx
  5338. ftp://gaea.kgs.ukans.ed/frontier/UCMDs/modernMMucmd.sit.hqx
  5339.  
  5340. Enjoy,
  5341.  
  5342. pf
  5343.  
  5344. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5345. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  5346. =========================================================================
  5347. Date:         Mon, 18 Apr 1994 16:49:19 -0400
  5348. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5349. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5350. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  5351. Subject:      menubar scripting addition?
  5352.  
  5353. Does anybody know of an AppleScript scripting addition that allows a script
  5354. to display some text in the menubar (ala SuperClock)?  Something along the
  5355. lines of "display dialog", but with the destinatwould take dates
  5356.     set year of nxtyr to yr + 1
  5357.     -- the next line fails for 1902 or any year earlier
  5358.     if yr > 1903 then  -- JWB: the conditional and the else part are added
  5359.         set len to (nxtyr - jan1) / days
  5360.     else
  5361.         set len to (jan1 - nxtyr) / days
  5362.     end if
  5363.     if 1 < lastlen - len then -- leap years are ok
  5364.         display dialog (yr as string) & "=" & len & "," & yr + 1 & "=" & 
  5365. lastlen
  5366.     end if
  5367.     copy len to lastlen
  5368. end repeat
  5369.  
  5370. --
  5371. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  5372. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  5373. =========================================================================
  5374. Date:         Tue, 19 Apr 1994 09:16:10 EDT
  5375. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5376. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5377. From:         Jeff Beebe <jeffbb@AOL.COM>
  5378. Subject:      Radio Buttons
  5379.  
  5380. When I build a dialog box in ResEdit with radio buttons, and then run it with
  5381. run dialog etc .... I can't get the radio button to stay on, whether enabled
  5382. or not in the DITL. How-to, anybody?
  5383.     Also, how can I get a script to access fastest the DLOG? Can I load it as
  5384. a resource in the script itself and mark it to preload? How to call? "run
  5385. dialog name of me?" Anybody done this, tried that?
  5386.    'Preshate help.
  5387. =========================================================================
  5388. Date:         Tue, 19 Apr 1994 09:38:24 -0400
  5389. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5390. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5391. From:         "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
  5392. Subject:      Re: How to distribute AppleScript?
  5393.  
  5394. >If a company develops an application that uses AppleScript, it is possible
  5395. >to distribute a runtime version of AppleScript with the application?
  5396. >Does the company doing this have to pay to redistribute it?
  5397. >
  5398. >Thanks.
  5399. >
  5400. >                          George
  5401. >
  5402. >P.S. I read the articles called "AppleScript Distribution License = $500",
  5403. >but they don't seem to answer this question.
  5404.  
  5405. There is a distribution license that comes with the AppleScript Scripter's
  5406. Toolkit.  The license allows for the distribution of the AppleScript and
  5407. Frontmost Runtime software (AS extension, Frontmost extension) with any
  5408. scripts that you develop.  The toolkit costs about $140. I found out from
  5409. Gary Little, the AppleScript Product Manager, that the $500 licensing fee
  5410. is required if you want to bundle additional AS-related software from Apple
  5411. (Script Editor, Scriptable Text Editor, etc.).
  5412.  
  5413. Lee.
  5414.  
  5415. Lee K. Hoong
  5416. Dept. of Chemistry, Emory University
  5417. Internet: lhoong@unix.cc.emory.edu  |  America On-line: LHOONG
  5418. Disclaimer: I speak for myself only, not for Emory University
  5419. =========================================================================
  5420. Date:         Tue, 19 Apr 1994 15:37:18 EDT
  5421. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5422. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5423. From:         "William J. Jamison" <jami1@AOL.COM>
  5424. Subject:      Re: menubar scripting addition?
  5425.  
  5426. I use the Tempo II+ externals, "Message" and "GetWindowName" to display
  5427. window names in the menu bar, works great for the purposes of eliminating
  5428. some guesswork in QK2. Thus somebody at Affinity (shameless plug) might be
  5429. able to point you in the right direction. :D
  5430.  
  5431. Jami1
  5432. =========================================================================
  5433. Date:         Wed, 20 Apr 1994 01:52:38 -0400
  5434. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5435. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5436. From:         Ross Brown <ab026@FREENET.CARLETON.CA>
  5437. Subject:      Menu Events / Menu Grabber 1.1.2 at gaea
  5438.  
  5439. Hello, scripters.  Just a note to let you know that Menu Events
  5440. and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
  5441. incoming directory, on their way to applescript/addons.
  5442.  
  5443. Version 1.1.2 adds some nifty new stuff to the package:
  5444.  
  5445. 1.  Menu Events makes System-7-savvy non-scriptable applications
  5446.     recordable as well as scriptable.  Turn on recording, press
  5447.     Caps Lock, and your menu selections will be recorded.
  5448.  
  5449. 2.  Menu Events and Menu Grabber now support the use of modifier
  5450.     keys (Shift, Control, Option, Command) with menu selections.
  5451.  
  5452. 3.  You can script Query Menu and Select Menu Item commands to
  5453.     applications such as BBEdit and ClarisWorks which use non-
  5454.     standard 'MDEF's... if you dare.  :-)  This used to be an error.
  5455.  
  5456. These programs have extensive documentation which should handle
  5457. most questions you may have.  And it's still free.  Enjoy...
  5458.  
  5459.  
  5460. --
  5461. Ross Brown - AWOL Software Productions
  5462. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  5463. publisher of AWOL Utilities - "the best deal in freeware!"
  5464. ab026@freenet.carleton.ca
  5465. =========================================================================
  5466. Date:         Tue, 19 Apr 1994 22:59:54 -0700
  5467. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5468. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5469. From:         Jon Pugh <jonpugh@NETCOM.COM>
  5470. Subject:      Re: AppleScript speed (or slowness)
  5471.  
  5472. >My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  5473. >itself (I still use 1.0, waiting for the Goodman update...).
  5474. >I'm running a IIvx with 7.1.
  5475. >
  5476. >What are your opinions or suggestions when it comes to AppleScript speed
  5477. >when cooperating with applications? Is it a general rule to bring
  5478. >AppleEvent calls to a minimum? For example, the sort mail script could
  5479. >perhaps fetch the entire header in one AE call (don't know if Eudora
  5480. >supports this), and process the information further within AppleScript. Am
  5481. >I correct?
  5482.  
  5483. The problem is not AppleEvents, although they are the manifestation as far
  5484. as AppleScript is concerned.  The real culprit is the Macintosh OS, in
  5485. particular, the Process Manager.  It is the bottleneck for context
  5486. switches, of which two are necessary for each AppleEvent.  Mind you, the
  5487. Process Manager is one of those places on the Macintosh that if you, as a
  5488. software engineer, touch it, you will go immediately insane.  It has
  5489. happened to several people already.
  5490.  
  5491. Basically, the Process Manager is the heart of the hack known as
  5492. MultiFinder.  It is crufty and ugly 68K assembly code.  It is emulated on
  5493. the PowerPC.  It is the embodiment of pure evil.  ;)
  5494.  
  5495. So, since AppleEvents is inherently an interprocess communication system,
  5496. it has to deal implicitly with the process manager.  If the process manager
  5497. is ever improved so that background apps get more time more regularly, then
  5498. I strongly suspect that AppleScript will see a marked improvement.
  5499.  
  5500. I also believe that this pokieness extends itself to Frontier too.
  5501.  
  5502. So, the short answer is Yes.  Keep your AppleEvent transactions to a
  5503. minimum and tranfer larger chunks of data.  Activate your programs to get
  5504. them into the front and dictating the time slices.
  5505.  
  5506. There ought to be a way to take a script and run it in the target
  5507. application's process via an osax which uses an OSASendProc to convert all
  5508. the AE into SendToSelf addressing.  That would short circuit the process
  5509. manager.  Hmm, I'll have to look into that.
  5510.  
  5511. Jon
  5512. =========================================================================
  5513. Date:         Wed, 20 Apr 1994 09:56:40 EDT
  5514. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5515. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5516. From:         "Lynn W. Becker II" <lbecker@HP8C.NRL.NAVY.MIL>
  5517. Subject:      Ugrading from the Tao Book AScript
  5518. In-Reply-To:  from "Automatic digest processor" at Apr 20, 94 12:05 (midnight)
  5519.  
  5520. Is there an "upgrader" available to upgrade the version of
  5521. AS that came with the Tao of Applescript?
  5522.  
  5523. thanks!
  5524.  
  5525. Lynn B.
  5526. =========================================================================
  5527. Date:         Wed, 20 Apr 1994 10:26:48 -0400
  5528. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5529. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5530. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  5531. Subject:      Re: AppleScript speed (or slowness)
  5532. In-Reply-To:  Your message of "Tue,
  5533.               19 Apr 1994 22:59:54 PDT." <199t looks like this:
  5534.  
  5535.         tell application "Scriptable Text Editor"
  5536.                 activate
  5537.                 set selection to "Welcome to AppleScript"
  5538.                 select word 3 of document 1
  5539.                 set style of selection to italic
  5540.         end tell
  5541.  
  5542. I save it as an Application called "My First Script", then I quit the
  5543. editor. Both editors, in fact.
  5544.  
  5545. Now. Whenever I double-click on the "My First Script" application, it
  5546. brings up the title box, and I click on "Run". It then immediately
  5547. quits, doing nothing.
  5548.  
  5549. What gives? This is a simple application -- and it doesn't work!!!
  5550. When I re-load it into the editor, and click on "run", it works fine.
  5551.  
  5552. HELP!!! It didn't take long for me to get frustrated with this!!
  5553.  
  5554. \marc
  5555.  
  5556. --
  5557. Marc N. Cannava                         |  Tigers are nimble,
  5558. Technical Staff, The MITRE Corporation  |  And light on their toes,
  5559. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  5560. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  5561. =========================================================================
  5562. Date:         Wed, 20 Apr 1994 13:06:55 -0500
  5563. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5564. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5565. From:         Fred Terry <pfterry@LKS.CSI.COM>
  5566. Subject:      new versions of Menu Events and Jon's Commands
  5567.  
  5568. Hi everyone,
  5569.  
  5570. I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
  5571. the appropriate directories. Jon's already let everyone know about the new
  5572. features in his osax. Among other things, Ross Brown has added recordability
  5573. and support for non-standard menu definitions to Menu Events. You can find out
  5574. more about it from the file
  5575.  
  5576. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  5577.  
  5578. You will find the updated versions in
  5579.  
  5580. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  5581. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
  5582. ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
  5583.  
  5584. Enjoy.
  5585.  
  5586. pf
  5587.  
  5588. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5589. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  5590. =========================================================================
  5591. Date:         Wed, 20 Apr 1994 12:03:27 -0700
  5592. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5593. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5594. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  5595. Subject:      Re: Can't get script to run!! Why?
  5596.  
  5597. At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  5598. >Now. I have a simple script that looks like this:
  5599. >
  5600. >        tell application "Scriptable Text Editor"
  5601. >                activate
  5602. >                set selection to "Welcome to AppleScript"
  5603. >                select word 3 of document 1
  5604. >                set style of selection to italic
  5605. >        end tell
  5606. >
  5607. >I save it as an Application called "My First Script", then I quit the
  5608. >editor. Both editors, in fact.
  5609. >
  5610. >Now. Whenever I double-click on the "My First Script" application, it
  5611. >brings up the title box, and I click on "Run". It then immediately
  5612. >quits, doing nothing.
  5613.  
  5614.  
  5615. Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  5616. etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  5617.  
  5618. I'd suspect something in your installation.  What does this variation do?
  5619.  
  5620. 1.  By hand, start Scriptable Text Editor.  You should have a blank
  5621. untiltled document (choose New from the File menu if that isn't true).
  5622.  
  5623. 2.  Double click on your saved script application.
  5624.  
  5625.  
  5626. If that works, now try quitting Scriptable Text Editor, and once again
  5627. double-clicking the saved script application.
  5628.  
  5629. --John
  5630.  
  5631. --
  5632. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  5633. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  5634. =========================================================================
  5635. Date:         Wed, 20 Apr 1994 13:13:33 -0800
  5636. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5637. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5638. From:         Mike Cohen <isis@NETCOM.COM>
  5639. Subject:      Re: AppleScript speed (or slowness)
  5640.  
  5641. At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
  5642. (explanation of process manager deleted)
  5643. >
  5644. >There ought to be a way to take a script and run it in the target
  5645. >application's process via an osax which uses an OSASendProc to convert all
  5646. >the AE into SendToSelf addressing.  That would short circuit the process
  5647. >manager.  Hmm, I'll have to look into that.
  5648. >
  5649. This would speed things up dramatically. Several of the enhacements in
  5650. Frontier such system event handlers make a very big difference in the
  5651. speed. Sending more data in each event also helps a lot.
  5652.  
  5653. Right now I'm fighting with Excel trying to speed up data transfers from
  5654. another application. I found that setting a cell at a time (which is the
  5655. easiest way in UserTalk) is painfully slow, but creating an array and
  5656. sending it to a range is a very big improvement. As for my own application
  5657. (which transfers data to/from a Newton), I was able to improve things a lot
  5658. by having a single event do something like "get next n records" rather than
  5659. getting a single record per event.
  5660.  
  5661. _______________________________________________________________
  5662. Mike Cohen
  5663. ISIS International   | "Software that means business"
  5664. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  5665. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  5666. =========================================================================
  5667. Date:         Wed, 20 Apr 1994 16:16:26 -0400
  5668. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5669. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5670. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  5671. Subject:      Re: Can't get script to run!! Why?
  5672. In-Reply-To:  <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
  5673.               Apr 20, 94 12:03:27 pm
  5674.  
  5675. >
  5676. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  5677. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  5678. >
  5679. > I'd suspect something in your installation.  What does this variation do?
  5680. >
  5681.  
  5682. Stranger and stranger:
  5683.  
  5684.         - If I record my actions and let the Script Editor build
  5685.           the script for me, then immediately save the script as an
  5686.           application, the resulting application doesn't work. By
  5687.           this, I mean that when I double-click on the application,
  5688.           it launches, asks me if I want to run it, then it just
  5689.           quits.
  5690.  
  5691.  
  5692.         - If, however, I record actions and then modify the script
  5693.           somehow (even just type a "space" into the editor box),
  5694.           then save it as an application, it works!!
  5695.  
  5696. I don't get it. I've installed the s/w on three machines now, and they
  5697. all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
  5698. Mac IIsi.)
  5699.  
  5700. Any ideas??
  5701.  
  5702. \marc
  5703.  
  5704. --
  5705. Marc N. Cannava                         |  Tigers are nimble,
  5706. Technical Staff, The MITRE Corporation  |  And light on their toes,
  5707. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  5708. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  5709. =========================================================================
  5710. Date:         Wed, 20 Apr 1994 16:34:28 -0400
  5711. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5712. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5713. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  5714. Subject:      Re: Can't get script to run!! Why?
  5715. In-Reply-To:  <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
  5716.               Apr 20, 94 12:03:27 pm
  5717.  
  5718. >
  5719. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  5720. > >Now. I have a simple script that looks like this:
  5721. > >
  5722. > >        tell application "Scriptable Text Editor"
  5723. > >                activate
  5724. > >                set selection to "Welcome to AppleScript"
  5725. > >                select word 3 of document 1
  5726. > >                set style of selection to italic
  5727. > >        end tell
  5728. > >
  5729. > >I save it as an Application called "My First Script", then I quit the
  5730. > >editor. Both editors, in fact.
  5731. > >
  5732. > >Now. Whenever I double-click on the "My First Script" application, it
  5733. > >brings up the title box, and I click on "Run". It then immediately
  5734. > >quits, doing nothing.
  5735. >
  5736.  
  5737. Even stranger::
  5738.  
  5739. If I take the script that I recorded, select it, copy it, paste it
  5740. into new script, then run the new script as an application, it works!
  5741. The original stil doesn't work.
  5742.  
  5743. My thoughts are that for some reason, I can't run a "recorded" script.
  5744. Any ideas why that might be so? Is there any difference between a
  5745. "recorded" script and one that I just typed in directly?
  5746.  
  5747. I'm so confused..
  5748.  
  5749. \marc
  5750.  
  5751. --
  5752. Marc N. Cannava                         |  Tigers are nimble,
  5753. Technical Staff, The MITRE Corporation  |  And light on their toes,
  5754. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  5755. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  5756. =========================================================================
  5757. Date:         Wed, 20 Apr 1994 14:24:54 -0700
  5758. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5759. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5760. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  5761. Subject:      Re: Can't get script to run!! Why?
  5762.  
  5763. At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
  5764. >        - If I record my actions and let the Script Editor build
  5765. >          the script for me, then immediately save the script as an
  5766. >          application, the resulting application doesn't work. By
  5767. >          this, I mean that when I double-click on the application,
  5768. >          it launches, asks me if I want to run it, then it just
  5769. >          quits.
  5770. >
  5771. >
  5772. >        - If, however, I record actions and then modify the script
  5773. >          somehow (even just type a "space" into the editor box),
  5774. >          then save it as an application, it works!!
  5775.  
  5776.  
  5777. Hmmm...making any change and then saving causes the script to be compiled
  5778. again.  Simply changing it probably doesn't.  Something about the
  5779. compilation fixes something (quite likely the form in which
  5780.  
  5781.     application "Scriptable Text Editor"
  5782.  
  5783. is stored in the compiled script.)
  5784.  
  5785. I don't think it *should* work that way.  [I had in fact changed the
  5786. recorded script slightly...when I follow your recipe correctly, I get the
  5787. same effect you do.]
  5788.  
  5789.    --John
  5790.  
  5791. --
  5792. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  5793. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  5794. =========================================================================
  5795. Date:         Wed, 20 Apr 1994 10:41:02 PDT
  5796. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5797. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5798. From:         "David Rogers,Eng" <david.rogers@ALDUS.COM>
  5799. Organization: Aldus Corporation, Seattle, WA
  5800. Subject:      Re: Can't get script to run!! Why?
  5801.  
  5802. Marc,
  5803.  
  5804. The script you sent works fine on my machine and I am using AS 1.1.  Two
  5805. things: 1) Make sure you check the syntax of the script before saving.  2)
  5806. When you save as an application check the "Never Show Startup Screen"
  5807. button.
  5808.  
  5809. Regards,
  5810. David
  5811. ---------------------------------------------------------------------------
  5812. david.rogers@aldus.com    -========)--  Frodo Lives
  5813. --(========-
  5814. ---------------------------------------------------------------------------
  5815. _______________________________________________________________________________
  5816. From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
  5817. Subject: Can't get script to run!! Why?
  5818. To: David Rogers,Eng
  5819.  
  5820. Help! This is driving me nuts!
  5821.  
  5822. I *just* got version 1.1 of the AppleScript Developer's Kit from
  5823. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  5824. Started" manual)!
  5825.  
  5826. They say to go into the Script Editor, enter "RECORD" mode, and then
  5827. fire up the Scriptable Text Editor, type some text, change the style.
  5828. Then, stop recording.
  5829.  
  5830. Now. I have a simple script that looks like this:
  5831.  
  5832.         tell application "Scriptable Text Editor"
  5833.                 activate
  5834.                 set selection to "Welcome to AppleScript"
  5835.                 select word 3 of document 1
  5836.                 set style of selection to italic
  5837.         end tell
  5838.  
  5839. I save it as an Application called "My First Script", then I quit the
  5840. editor. Both editors, in fact.
  5841.  
  5842. Now. Whenever I double-click on the "My First Script" application, it
  5843. brings up the title box, and I click on "Run". It then immediately
  5844. quits, doing nothing.
  5845.  
  5846. What gives? This is a simple application -- and it doesn't work!!!
  5847. When I re-load it into the editor, and click on "run", it works fine.
  5848.  
  5849. HELP!!! It didn't take long for me to get frustrated with this!!
  5850.  
  5851. \marc
  5852.  
  5853. --
  5854. Marc N. Cannava                         |  Tigers are nimble,
  5855. Technical Staff, The MITRE Corporation  |  And light on their toes,
  5856. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  5857. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  5858. =========================================================================
  5859. Date:         Wed, 20 Apr 1994 20:39:07 -0700
  5860. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5861. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5862. From:         "Allan R. Crump" <jhhw@CRL.COM>
  5863. Subject:      Re: Can't get script to run!! Why?
  5864. In-Reply-To:  <199404201925.AA28312@mail.crl.com>
  5865.  
  5866. Why not try copying the script into Script Editor and running it from
  5867. there ?  You could probably trap it with some dialog messages and see
  5868. what it's doing...
  5869. (just my 2cents worth)
  5870.  
  5871.  
  5872. On Wed, 20 Apr 1994, John W. Baxter wrote:
  5873.  
  5874. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  5875. > >Now. I have a simple script that looks like this:
  5876. > >
  5877. > >        tell application "Scriptable Text Editor"
  5878. > >                activate
  5879. > >                set selection to "Welcome to AppleScript"
  5880. > >                select word 3 of document 1
  5881. > >                set style of selection to italic
  5882. > >        end tell
  5883. > >
  5884. > >I save it as an Application called "My First Script", then I quit the
  5885. > >editor. Both editors, in fact.
  5886. > >
  5887. > >Now. Whenever I double-click on the "My First Script" application, it
  5888. > >brings up the title box, and I click on "Run". It then immediately
  5889. > >quits, doing nothing.
  5890. >
  5891. >
  5892. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  5893. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  5894. >
  5895. > I'd suspect something in your installation.  What does this variation do?
  5896. >
  5897. > 1.  By hand, start Scriptable Text Editor.  You should have a blank
  5898. > untiltled document (choose New from the File menu if that isn't true).
  5899. >
  5900. > 2.  Double click on your saved script application.
  5901. >
  5902. >
  5903. > If that works, now try quitting Scriptable Text Editor, and once again
  5904. > double-clicking the saved script application.
  5905. >
  5906. > --John
  5907. >
  5908. > --
  5909. > jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  5910. > finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  5911. >
  5912. =========================================================================
  5913. Date:         Thu, 21 Apr 1994 12:03:10 +0800
  5914. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5915. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5916. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  5917. Subject:      Re: AppleScript speed (or slowness)
  5918.  
  5919. >        This whole "situation" will improve SIGNIFICANTLY with the next
  5920. >major release of System Software (ie. 7.5) which includes an improved
  5921. >Process Manager that interacts much better with AppleScript and AE's...
  5922.  
  5923. Speaking of speeding things up.  I now have my PPC card for my Q610 and
  5924. Stuffit Expander is Oh So Slow compared to before.  Does it make Native
  5925. versions arrive any faster if I send dollars :-)  And how much is Stuffit
  5926. Deluxe?
  5927.  
  5928. Cheers,
  5929. Craig
  5930.  
  5931. --
  5932. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  5933. The University of Western Australia      or 380 3860 Email for FAX Number
  5934. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  5935. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  5936. =========================================================================
  5937. Date:         Wed, 20 Apr 1994 13:24:39 -0700
  5938. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5939. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5940. Comments:     Warning -- original Sender: tag was rogerk@UNPC.QUEERNET.ORG
  5941. From:         Automatic digest processor <LISTSERV@DARTCMS1.DARTMOUTH.EDU>
  5942. Subject:      MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  5943.  
  5944. There are 17 messages totalling 586 lines in this issue.
  5945.  
  5946. Topics of the day:
  5947.  
  5948.   1. Menu Events / Menu Grabber 1.1.2 at gaea
  5949.   2. AppleScript speed (or slowness) (5)
  5950.   3. Ugrading from the Tao Book AScript (2)
  5951.   4. AppleScript Versions
  5952.   5. Can't get script to run!! Why? (7)
  5953.   6. new versions of Menu Events and Jon's Commands
  5954.  
  5955. ----------------------------------------------------------------------
  5956.  
  5957. Date:    Wed, 20 Apr 1994 01:52:38 -0400
  5958. From:    Ross Brown <ab026@FREENET.CARLETON.CA>
  5959. Subject: Menu Events / Menu Grabber 1.1.2 at gaea
  5960.  
  5961. Hello, scripters.  Just a note to let you know that Menu Events
  5962. and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
  5963. incoming directory, on their way to applescript/addons.
  5964.  
  5965. Version 1.1.2 adds some nifty new stuff to the package:
  5966.  
  5967. 1.  Menu Events makes System-7-savvy non-scriptable applications
  5968.     recordable as well as scriptable.  Turn on recording, press
  5969.     Caps Lock, and your menu selections will be recorded.
  5970.  
  5971. 2.  Menu Events and Menu Grabber now support the use of modifier
  5972.     keys (Shift, Control, Option, Command) with menu selections.
  5973.  
  5974. 3.  You can script Query Menu and Select Menu Item commands to
  5975.     applications such as BBEdit and ClarisWorks which use non-
  5976.     standard 'MDEF's... if you dare.  :-)  This used to be an error.
  5977.  
  5978. These programs have extensive documentation which should handle
  5979. most questions you may have.  And it's still free.  Enjoy...
  5980.  
  5981.  
  5982. --
  5983. Ross Brown - AWOL Software Productions
  5984. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  5985. publisher of AWOL Utilities - "the best deal in freeware!"
  5986. ab026@freenet.carleton.ca
  5987.  
  5988. ------------------------------
  5989.  
  5990. Date:    Tue, 19 Apr 1994 22:59:54 -0700
  5991. From:    Jon Pugh <jonpugh@NETCOM.COM>
  5992. Subject: Re: AppleScript speed (or slowness)
  5993.  
  5994. >My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  5995. >itself (I still use 1.0, waiting for the Goodman update...).
  5996. >I'm running a IIvx with 7.1.
  5997. >
  5998. >What are your opinions or suggestions when it comes to AppleScript speed
  5999. >when cooperating with applications? Is it a general rule to bring
  6000. >AppleEvent calls to a minimum? For example, the sort mail script could
  6001. >perhaps fetch the entire header in one AE call (don't know if Eudora
  6002. >supports this), and process the information further within AppleScript. Am
  6003. >I correct?
  6004.  
  6005. The problem is not AppleEvents, although they are the manifestation as far
  6006. as AppleScript is concerned.  The real culprit is the Macintosh OS, in
  6007. particular, the Process Manager.  It is the bottleneck for context
  6008. switches, of which two are necessary for each AppleEvent.  Mind you, the
  6009. Process Manager is one of those places on the Macintosh that if you, as a
  6010. software engineer, touch it, you will go immediately insane.  It has
  6011. happened to several people already.
  6012.  
  6013. Basically, the Process Manager is the heart of the hack known as
  6014. MultiFinder.  It is crufty and ugly 68K assembly code.  It is emulated on
  6015. the PowerPC.  It is the embodiment of pure evil.  ;)
  6016.  
  6017. So, since AppleEvents is inherently an interprocess communication system,
  6018. it has to deal implicitly with the process manager.  If the process manager
  6019. is ever improved so that background apps get more time more regularly, then
  6020. I strongly suspect that AppleScript will see a marked improvement.
  6021.  
  6022. I also believe that this pokieness extends itself to Frontier too.
  6023.  
  6024. So, the short answer is Yes.  Keep your AppleEvent transactions to a
  6025. minimum and tranfer larger chunks of data.  Activate your programs to get
  6026. them into the front and dictating the time slices.
  6027.  
  6028. There ought to be a way to take a script and run it in the target
  6029. application's process via an osax which uses an OSASendProc to convert all
  6030. the AE into SendToSelf addressing.  That would short circuit the process
  6031. manager.  Hmm, I'll have to look into that.
  6032.  
  6033. Jon
  6034.  
  6035. ------------------------------
  6036.  
  6037. Date:    Wed, 20 Apr 1994 09:56:40 EDT
  6038. From:    "Lynn W. Beckhe title box, and I click on "Run". It then immediately
  6039. quits, doing nothing.
  6040.  
  6041. What gives? This is a simple application -- and it doesn't work!!!
  6042. When I re-load it into the editor, and click on "run", it works fine.
  6043.  
  6044. HELP!!! It didn't take long for me to get frustrated with this!!
  6045.  
  6046. \marc
  6047.  
  6048. --
  6049. Marc N. Cannava                         |  Tigers are nimble,
  6050. Technical Staff, The MITRE Corporation  |  And light on their toes,
  6051. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  6052. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  6053.  
  6054. ------------------------------
  6055.  
  6056. Date:    Wed, 20 Apr 1994 13:06:55 -0500
  6057. From:    Fred Terry <pfterry@LKS.CSI.COM>
  6058. Subject: new versions of Menu Events and Jon's Commands
  6059.  
  6060. Hi everyone,
  6061.  
  6062. I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
  6063. the appropriate directories. Jon's already let everyone know about the new
  6064. features in his osax. Among other things, Ross Brown has added recordability
  6065. and support for non-standard menu definitions to Menu Events. You can find out
  6066. more about it from the file
  6067.  
  6068. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  6069.  
  6070. You will find the updated versions in
  6071.  
  6072. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  6073. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
  6074. ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
  6075.  
  6076. Enjoy.
  6077.  
  6078. pf
  6079.  
  6080. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6081. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  6082.  
  6083. ------------------------------
  6084.  
  6085. Date:    Wed, 20 Apr 1994 12:03:27 -0700
  6086. From:    "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  6087. Subject: Re: Can't get script to run!! Why?
  6088.  
  6089. At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  6090. >Now. I have a simple script that looks like this:
  6091. >
  6092. >        tell application "Scriptable Text Editor"
  6093. >                activate
  6094. >                set selection to "Welcome to AppleScript"
  6095. >                select word 3 of document 1
  6096. >                set style of selection to italic
  6097. >        end tell
  6098. >
  6099. >I save it as an Application called "My First Script", then I quit the
  6100. >editor. Both editors, in fact.
  6101. >
  6102. >Now. Whenever I double-click on the "My First Script" application, it
  6103. >brings up the title box, and I click on "Run". It then immediately
  6104. >quits, doing nothing.
  6105.  
  6106.  
  6107. Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  6108. etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  6109.  
  6110. I'd suspect something in your installation.  What does this variation do?
  6111.  
  6112. 1.  By hand, start Scriptable Text Editor.  You should have a blank
  6113. untiltled document (choose New from the File menu if that isn't true).
  6114.  
  6115. 2.  Double click on your saved script application.
  6116.  
  6117.  
  6118. If that works, now try quitting Scriptable Text Editor, and once again
  6119. double-clicking the saved script application.
  6120.  
  6121. --John
  6122.  
  6123. --
  6124. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  6125. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  6126.  
  6127. ------------------------------
  6128.  
  6129. Date:    Wed, 20 Apr 1994 13:13:33 -0800
  6130. From:    Mike Cohen <isis@NETCOM.COM>
  6131. Subject: Re: AppleScript speed (or slowness)
  6132.  
  6133. At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
  6134. (explanation of process manager deleted)
  6135. >
  6136. >There ought to be a way to take a script and run it in the target
  6137. >application's process via an osax which uses an OSASendProc to convert all
  6138. >the AE into SendToSelf addressing.  That would short circuit the process
  6139. >manager.  Hmm, I'll have to look into that.
  6140. >
  6141. This would speed things up dramatically. Several of the enhacements in
  6142. Frontier such system event handlers make a very big difference in the
  6143. speed. Sending more data in each event also helps a lot.
  6144.  
  6145. Right now I'm fighting with Excel trying to speed up data transfers from
  6146. another application. I found that setting a cell at a time (which is the
  6147. easiest way in UserTalk) is painfully slow, but creating an array and
  6148. sending it to a range is a very big improvement. As for my own application
  6149. (which transfers data to/from a Newton), I was able to improve things a lot
  6150. by having a single event do something like "get next n records" rather than
  6151. getting a single record per event.
  6152.  
  6153. _______________________________________________________________
  6154. Mike Cohen
  6155. ISIS International   | "Software that means business"
  6156. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  6157. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  6158.  
  6159. ------------------------------
  6160.  
  6161. Date:    Wed, 20 Apr 1994 16:16:26 -0400
  6162. From:    "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  6163. Subject: Re: Can't get script to run!! Why?
  6164.  
  6165. >
  6166. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  6167. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  6168. >
  6169. > I'd suspect something in your installation.  What does this variation do?
  6170. >
  6171.  
  6172. Stranger and stranger:
  6173.  
  6174.         - If I record my actions and let the Script Editor build
  6175.           the script for me, then immediately save the script as an
  6176.           application, the resulting application doesn't work. By
  6177.           this, I mean that when I double-click on the application,
  6178.           it launches, asks me if I want to run it, then it just
  6179.           quits.
  6180.  
  6181.  
  6182.         - If, however, I record actions and then modify the script
  6183.           somehow (even just type a "space" into the editor box),
  6184.           then save it as an application, it works!!
  6185.  
  6186. I don't get it. I've installed the s/w on three machines now, and they
  6187. all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
  6188. Mac IIsi.)
  6189.  
  6190. Any ideas??
  6191.  
  6192. \marc
  6193.  
  6194. --
  6195. Marc N. Cannava                         |  Tigers are nimble,
  6196. Technical Staff, The MITRE Corporation  |  And light on their toes,
  6197. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  6198. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  6199.  
  6200. ------------------------------
  6201.  
  6202. Date:    Wed, 20 Apr 1994 16:34:28 -0400
  6203. From:    "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  6204. Subject: Re: Can't get script to run!! Why?
  6205.  
  6206. >
  6207. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  6208. > >Now. I have a simple script that looks like this:
  6209. > >
  6210. > >        tell application "Scriptable Text Editor"
  6211. > >                activate
  6212. > >                set selection to "Welcome to AppleScript"
  6213. > >                select word 3 of document 1
  6214. > >                set style of selection to italic
  6215. > >        end tell
  6216. > >
  6217. > >I save it as an Application called "My First Script", then I quit the
  6218. > >editor. Both editors, in fact.
  6219. > >
  6220. > >Now. Whenever I double-click on the "My First Script" application, it
  6221. > >brings up the title box, and I click on "Run". It then immediately
  6222. > >quits, doing nothing.
  6223. >
  6224.  
  6225. Even stranger::
  6226.  
  6227. If I take the script that I recorded, select it, copy it, paste it
  6228. into new script, then run the new script as an application, it works!
  6229. The original stil doesn't work.
  6230.  
  6231. My thoughts are that for some reason, I can't run a "recorded" script.
  6232. Any ideas why that might be so? Is there any difference between a
  6233. "recorded" script and one that I just typed in directly?
  6234.  
  6235. I'm so confused..
  6236.  
  6237. \marc
  6238.  
  6239. --
  6240. Marc N. Cannava                         |  Tigers are nimble,
  6241. Technical Staff, The MITRE Corporation  |  And light on their toes,
  6242. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  6243. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  6244.  
  6245. ------------------------------
  6246.  
  6247. Date:    Wed, 20 Apr 1994 14:24:54 -0700
  6248. From:    "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  6249. Subject: Re: Can't get script to run!! Why?
  6250.  
  6251. At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
  6252. >        - If I record my actions and let the Script Editor build
  6253. >          the script for me, then immediately save the script as an
  6254. >          application, the resulting application doesn't work. By
  6255. >          this, I mean that when I double-click on the application,
  6256. >          it launches, asks me if I want to run it, then it just
  6257. >          quits.
  6258. >
  6259. >
  6260. >        - If, however, I record actions and then modify the script
  6261. >          somehow (even just type a "space" into the editor box),
  6262. >          then save it as an application, it works!!
  6263.  
  6264.  
  6265. Hmmm...making any change and then saving causes the script to be compiled
  6266. again.  Simply changing it probably doesn't.  Something about the
  6267. compilation fixes something (quite likely the form in which
  6268.  
  6269.     application "Scriptable Text Editor"
  6270.  
  6271. is stored in the compiled script.)
  6272.  
  6273. I don't think it *should* work that way.  [I had in fact changed the
  6274. recorded script slightly...when I follow your recipe correctly, I get the
  6275. same effect you do.]
  6276.  
  6277.    --John
  6278.  
  6279. --
  6280. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  6281. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  6282.  
  6283. ------------------------------
  6284.  
  6285. Date:    Wed, 20 Apr 1994 10:41:02 PDT
  6286. From:    "David Rogers,Eng" <david.rogers@ALDUS.COM>
  6287. Subject: Re: Can't get script to run!! Why?
  6288.  
  6289. Marc,
  6290.  
  6291. The script you sent works fine on my machine and I am using AS 1.1.  Two
  6292. things: 1) Make sure you check the syntax of the script before saving.  2)
  6293. When you save as an application check the "Never Show Startup Screen"
  6294. button.
  6295.  
  6296. Regards,
  6297. David
  6298. ---------------------------------------------------------------------------
  6299. david.rogers@aldus.com    -========)--  Frodo Lives
  6300. --(========-
  6301. ---------------------------------------------------------------------------
  6302. _______________________________________________________________________________
  6303. From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
  6304. Subject: Can't get script to run!! Why?
  6305. To: David Rogers,Eng
  6306.  
  6307. Help! This is driving me nuts!
  6308.  
  6309. I *just* got version 1.1 of the AppleScript Developer's Kit from
  6310. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  6311. Started" manual)!
  6312.  
  6313. They say to go into the Script Editor, enter "RECORD" mode, and then
  6314. fire up the Scriptable Text Editor, type some text, change the style.
  6315. Then, stop recording.
  6316.  
  6317. Now. I have a simple script that looks like this:
  6318.  
  6319.         tell application "Scriptable Text Editor"
  6320.                 activate
  6321.                 set selection to "Welcome to AppleScript"
  6322.                 select word 3 of document 1
  6323.                 set style of selection to italic
  6324.         end tell
  6325.  
  6326. I save it as an Application called "My First Script", then I quit the
  6327. editor. Both editors, in fact.
  6328.  
  6329. Now. Whenever I double-click on the "My First Script" application, it
  6330. brings up the title box, and I click on "Run". It then immediately
  6331. quits, doing nothing.
  6332.  
  6333. What gives? This is a simple application -- and it doesn't work!!!
  6334. When I re-load it into the editor, and click on "run", it works fine.
  6335.  
  6336. HELP!!! It didn't take long for me to get frustrated with this!!
  6337.  
  6338. \marc
  6339.  
  6340. --
  6341. Marc N. Cannava                         |  Tigers are nimble,
  6342. Technical Staff, The MITRE Corporation  |  And light on their toes,
  6343. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  6344. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  6345.  
  6346. ------------------------------
  6347.  
  6348. Date:    Wed, 20 Apr 1994 20:39:07 -0700
  6349. From:    "Allan R. Crump" <jhhw@CRL.COM>
  6350. Subject: Re: Can't get script to run!! Why?
  6351.  
  6352. Why not try copying the script into Script Editor and running it from
  6353. there ?  You could probably trap it with some dialog messages and see
  6354. what it's doing...
  6355. (just my 2cents worth)
  6356.  
  6357.  
  6358. On Wed, 20 Apr 1994, John W. Baxter wrote:
  6359.  
  6360. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  6361. > >Now. I have a simple script that looks like this:
  6362. > >
  6363. > >        tell application "Scriptable Text Editor"
  6364. > >                activate
  6365. > >                set selection to "Welcome to AppleScript"
  6366. > >                select word 3 of document 1
  6367. > >                set style of selection to italic
  6368. > >        end tell
  6369. > >
  6370. > >I save it as an Application called "My First Script", then I quit the
  6371. > >editor. Both editors, in fact.
  6372. > >
  6373. > >Now. Whenever I double-click on the "My First Script" application, it
  6374. > >brings up the title box, and I click on "Run". It then immediately
  6375. > >quits, doing nothing.
  6376. >
  6377. >
  6378. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  6379. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  6380. >
  6381. > I'd suspect something in your installation.  What does this variation do?
  6382. >
  6383. > 1.  By hand, start Scriptable Text Editor.  You should have a blank
  6384. > untiltled document (choose New from the File menu if that isn't true).
  6385. >
  6386. > 2.  Double click on your saved script application.
  6387. >
  6388. >
  6389. > If that works, now try quitting Scriptable Text Editor, and once again
  6390. > double-clicking the saved script application.
  6391. >
  6392. > --John
  6393. >
  6394. > --
  6395. > jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  6396. > finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  6397. >
  6398.  
  6399. ------------------------------
  6400.  
  6401. Date:    Thu, 21 Apr 1994 12:03:10 +0800
  6402. From:    Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  6403. Subject: Re: AppleScript speed (or slowness)
  6404.  
  6405. >        This whole "situation" will improve SIGNIFICANTLY with the next
  6406. >major release of System Software (ie. 7.5) which includes an improved
  6407. >Process Manager that interacts much better with AppleScript and AE's...
  6408.  
  6409. Speaking of speeding things up.  I now have my PPC card for my Q610 and
  6410. Stuffit Expander is Oh So Slow compared to before.  Does it make Native
  6411. versions arrive any faster if I send dollars :-)  And how much is Stuffit
  6412. Deluxe?
  6413.  
  6414. Cheers,
  6415. Craig
  6416.  
  6417. --
  6418. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  6419. The University of Western Australia      or 380 3860 Email for FAX Number
  6420. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  6421. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  6422.  
  6423. ------------------------------
  6424.  
  6425. End of MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  6426. ***************************************************
  6427. =========================================================================
  6428. Date:         Wed, 20 Apr 1994 23:42:43 -0600
  6429. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6430. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6431. From:         Tom Donovan <donovan@COVIS.NWU.EDU>
  6432. Subject:      AppleScript speed & packing Apple events
  6433.  
  6434. In light of recent discussion indicating that modest speed-ups can be had
  6435. by sending fewer individual apple events, I would like to try to use the
  6436. full form of Eudora's 'make' event:
  6437.  
  6438. make ObjectClass message InsertHere end of mailbox "Out" of mail folder ""
  6439. [with data] [with properties]
  6440.  
  6441. rather than a 'make' plus a handful of 'set's, but haven't had any luck
  6442. divining the syntax.
  6443.  
  6444. Has anyone tried this successfully?  If so, I'd love to know how.
  6445.  
  6446. Many thanks!
  6447.  
  6448. --Tom
  6449.  
  6450.  
  6451. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6452. Tom Donovan           "The city is a place where a small boy, as he walks
  6453. System Administrator   through it, may see something that will tell him what
  6454. CoVis Project          he wants to do his whole life."
  6455. Northwestern Univ.
  6456.                                                     --Louis I. Kahn
  6457. E-mail: donovan@covis.nwu.edu
  6458. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6459. =========================================================================
  6460. Date:         Thu, 21 Apr 1994 00:11:55 -0700
  6461. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6462. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6463. From:         Jon Pugh <jonpugh@NETCOM.COM>
  6464. Subject:      Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  6465.  
  6466. >Even stranger::
  6467. >
  6468. >If I take the script that I recorded, select it, copy it, paste it
  6469. >into new script, then run the new script as an application, it works!
  6470. >The original stil doesn't work.
  6471. >
  6472. >My thoughts are that for some reason, I can't run a "recorded" script.
  6473. >Any ideas why that might be so? Is there any difference between a
  6474. >"recorded" script and one that I just typed in directly?
  6475. >
  6476. >I'm so confused..
  6477.  
  6478. This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
  6479. it and Warren fixed it.  Isn't that special?  ;)
  6480.  
  6481. The detail is that OSAStopRecording returns a handler instead of a script
  6482. object.  The bug wasn't noticed because OSAStopRecording doesn't take a
  6483. modeFlags parameter and it needed to be kOSAModeCompileIntoContext instead
  6484. of kOSAModeNull (and was changed so in 1.1).  Since everyone seemed to
  6485. re-record their scripts it got missed.  In fact, the workaround is simply
  6486. to compile your script again.  Imagine that.
  6487.  
  6488. Handlers are collections of subroutines, but don't involve properties or
  6489. any saved state information.  That's what a context consists of in
  6490. AppleScript.  Every script has an implicit "script <name>" and "end script"
  6491. around it.  As you should know, you also have a implicit "on run" handler
  6492. around your miscellaneous script statements which can be strewn throughout
  6493. your code like so:
  6494.  
  6495. beep
  6496. on open (theFiles)
  6497. end open
  6498. display dialog "Foo!"
  6499.  
  6500. Script objects are one of the way cool things about AppleScript.  You can
  6501. do some pretty nifty stuff with them.  See my Walk Folder osax for a decent
  6502. example of one use for them.  Another use was in my OSA Menu script that I
  6503. recently posted.
  6504.  
  6505. Basically, scripts are:
  6506.  
  6507.   script <name>
  6508.  
  6509.     <prop | property> <propName> : <initial compile time value>
  6510.  
  6511.     on <handlerName>[(params)]
  6512.       [statements]
  6513.     end [<handlerName>]
  6514.  
  6515.   end [<name>]
  6516.  
  6517. You can have 0 or more properties and 0 or more handlers.  Thus, script
  6518. objects can retain values in their properties, giving them persistent
  6519. storage.  The important thing is that the specified initial value will be
  6520. used whenever the script is compiled and will always be displayed when
  6521. viewed.  You cannot directly see the current value of a property.  You need
  6522. to write a script (naturally) which does a "load script" on the script
  6523. resource file and then runs a script like "foo's propName" or "propName of
  6524. foo" which evaluates to the current property value.  If you want a script
  6525. to retain its value, then I strongly recommend never putting code into it
  6526. and/or making it read only.
  6527.  
  6528. Well, that's the ramble for today.  Oh, here's a typing-saver tip.  You can
  6529. use app for application in your tell statement.  It will be expanded.
  6530.  
  6531. Jon
  6532. =========================================================================
  6533. Date:         Thu, 21 Apr 1994 00:03:00 EST
  6534. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6535. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6536. From:         Joseph Block <0006316815@MCIMAIL.COM>
  6537. Subject:      Cheap LISTSERV reception, t
  6538.  
  6539.  If you get two of these, it is because my machine crashed while
  6540. sending the first
  6541. This is going to several lists since it is getting to be that time of
  6542. year when students lose access again.
  6543.  
  6544. No flames for being off topic or commercial please; I'm providing
  6545. this information as a recommendation from a satisfied customer and
  6546. gain nothing (in fact I'm paying to send it) if you decide to act
  6547. upon it other than your continued participation in these lists.
  6548.  
  6549. MCIMail allows unlimited free message reception for $35 annually.
  6550. There is no connect time charge for downloading the messages on the
  6551. 9600 baud 800 number.  Outgoing messages are charged per message,
  6552. depending on the number of characters.  Admittedly the outgoing mail
  6553. isn't cheap, but you can use Cserve/AOL/Delphi/Whatever for that.
  6554. MCIMail also has a special student rate that is (I think) $5 per
  6555. month, but includes 100 free outgoing messages (the first 500 chars
  6556. anyway).  I don't happen to have the 800 number with me.  Other than
  6557. a free account, it is hard to beat $3 a month for your email fix.
  6558.  
  6559. You should also contact netcom (info@netcom.com) about their service.
  6560.  Also, check out Intercon's WorldLink.
  6561. =========================================================================
  6562. Date:         Thu, 21 Apr 1994 09:53:57 GMT
  6563. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6564. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6565. From:         Jean-Michel Beuken <beuken@PCPM.UCL.AC.BE>
  6566. Subject:      "keyword" parameter in Frontier Script
  6567.  
  6568. hello,
  6569.  
  6570. How is it possible to use the "keyword" parameter in Frontier Script ?
  6571. Here above, You can see a piece of code to send a AppleEvent to Frontier.
  6572. I create an script in 'system.verbs.traps.igor.test'
  6573. All work perfectly ! Frontier receives the two parameters and the
  6574. application receive well the returned parameter.
  6575. But my question is : is it possible in Frontier to know the "keyword" (here
  6576. 'typl' or 'typs') associated to the value ?
  6577.  
  6578.  
  6579.  
  6580. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6581. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6582. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6583. =3D=3D=3D=3D
  6584. .
  6585. .
  6586. .
  6587. static long serverid =3D 'LAND'    /* Userland Frontier is the server */
  6588. static Boolean NewAppleEvent (OSType verbtoken, AppleEvent *event) {
  6589.  
  6590.        AEAddressDesc adr;
  6591.        OSErr ec;
  6592.  
  6593.        ec =3D AECreateDesc(typeApplSignature, (Ptr)
  6594. &serverid,sizeof(serverid), &adr);
  6595.  
  6596.        ec =3D AECreateAppleEvent ('igor', verbtoken, &adr, kAutoGenerateRetu=
  6597. rnID,
  6598.                  kAnyTransactionID, event);
  6599.        AEDisposeDesc (&adr);
  6600.        return (ec =3D=3D noErr);
  6601. }
  6602.  
  6603. static int
  6604. Xdummy() {
  6605.         AppleEvent event, reply;
  6606.         long idlong =3D 33;
  6607.         short idshort =3D 11;
  6608.         Boolean fl;
  6609.  
  6610.         if (!NewAppleEvent ('test', &event))
  6611.                 return (false);
  6612.         if (!PushLongParam (idlong, 'typl', &event))
  6613.                 return (false);
  6614.         if (!PushShortParam (idshort, 'typs', &event))
  6615.                 return (false);
  6616.         if (!SendAppleEvent (&event, &reply, false))
  6617.                 return (false);
  6618.  
  6619.         fl =3D GetLongParam (&reply, keyDirectObject, &idlong);
  6620.         AEDisposeDesc (&reply);
  6621.  
  6622.         return(0)
  6623. }
  6624. .
  6625. .
  6626. .
  6627. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6628. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6629. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6630. =3D=3D=3D=3D
  6631.  
  6632.  
  6633. system.verbs.traps.igor.test :
  6634. -----------------------------
  6635.  
  6636. on test (idlong,idshort) {
  6637.         Frontier.bringToFront();;
  6638.         msg("receiving : " + idlong + ", " + idshort );
  6639.         =AB il1 =3D getEventAttribute ('typl')              /* doesn't work=
  6640.  ! */
  6641.         Igor.bringToFront();
  6642.         return (99)
  6643. }
  6644.  
  6645.  
  6646.  
  6647. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6648. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6649. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  6650. =3D=3D=3D=3D
  6651.  
  6652.  
  6653. -------------------------------------------------------------
  6654. Dr Ir Jean-Michel Beuken
  6655. Computer Scientist & Network Manager
  6656. University of Louvain-La-Neuve
  6657. Lab. PCPM/FSA, Bat. BOLTZMANN
  6658. 1,Place Croix du Sud
  6659. 1348 Louvain-La-Neuve
  6660. BELGIUM
  6661. =46ax (3210)473452
  6662. -------------------------------------------------------------
  6663. =========================================================================
  6664. Date:         Thu, 21 Apr 1994 17:16:07 +0930
  6665. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6666. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6667. From:         Paul Baily <paulb@RANDOMSA.COM.AU>
  6668. Subject:      deleting parts of a variable?
  6669.  
  6670. Hi folks,
  6671.  
  6672. At the risk of asking an embarassingly easy question, how do I delete a
  6673. word or a text item from a variable within AppleScript (1.1)?
  6674.  
  6675. In HyperCard, what I'd do is something like:
  6676.  
  6677.    put "I don't eat snails.  I prefer fast food." into theVar
  6678. [...]
  6679.    delete word 7 of theVar
  6680.  
  6681. with the result of "I don't eat snails.  I prefer food."
  6682.  
  6683. ...but within AppleScript (using 'copy...to' instead of 'put...into' of
  6684. course) this produces this error:
  6685.  
  6686. word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  6687. delete message.
  6688.  
  6689. Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  6690. tried other alternatives like using text items, using 'set word 3 of theVar
  6691. to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  6692. driving me batty. Could some kind soul enlighten me so I can put the whole
  6693. experience behind me and get some sleep? :-)
  6694.  
  6695. TIA,
  6696.  
  6697. Paul.
  6698.  
  6699. --
  6700. _________________________________________________________________________
  6701. Paul Baily, Consulting SE       |                   paulb@randomsa.com.au
  6702.                                 |                    AppleLink:  AUST0370
  6703. ))/\ Random Access              |                   CompuServe: 73320,667
  6704.  \\\\Adelaide, South Australia  |Where we're going, we don't *need* roads
  6705. =========================================================================
  6706. Date:         Thu, 21 Apr 1994 11:26:47 +0000
  6707. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6708. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6709. From:         Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
  6710. Subject:      Hiding Apps from Frontier
  6711.  
  6712. Does anybody know how to hide an application from Frntier? I know it can be
  6713. done by getting Frontier to tell Quickeys to do the hiding, but I find this
  6714. technique inelegant, wasteful and risky!
  6715.  
  6716. I expected to find a command like Finder.hide(appID)/Finder.show(appID).
  6717.  
  6718. Thanks  Jeremy Quinn
  6719.  
  6720.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  6721.              Jeremy Quinn             :              Internet:
  6722.             3D/Interactive            :       jermq@media.demon.co.uk
  6723.               Designer &              :               Phone:
  6724.         Green Design Consultant       :           +44 71 737 6831
  6725.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  6726.       Member of O2 Global Network     :     PGP Key on public keyservers
  6727. =========================================================================
  6728. Date:         Thu, 21 Apr 1994 07:34:58 -0400
  6729. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6730. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6731. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  6732. Subject:      Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  6733. In-Reply-To:  <199404210713.DAA04857@mbunix.mitre.org> from "Jon Pugh" at Apr
  6734.               21, 94 00:11:55 am
  6735.  
  6736. >
  6737. > >Even stranger::
  6738. > >
  6739. > >If I take the script that I recorded, select it, copy it, paste it
  6740. > >into new script, then run the new script as an application, it works!
  6741. > >The original stil doesn't work.
  6742. > >
  6743. > >My thoughts are that for some reason, I can't run a "recorded" script.
  6744. > >Any ideas why that might be so? Is there any difference between a
  6745. > >"recorded" script and one that I just typed in directly?
  6746. > >
  6747. > >I'm so confused..
  6748. >
  6749. > This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
  6750. > it and Warren fixed it.  Isn't that special?  ;)
  6751. >
  6752.  
  6753. But I'm running AppleScript 1.1. I still have the bug. Is there a
  6754. patch to fix this??
  6755.  
  6756. \marc
  6757.  
  6758. --
  6759. Marc N. Cannava                         |  Tigers are nimble,
  6760. Technical Staff, The MITRE Corporation  |  And light on their toes,
  6761. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  6762. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  6763. =========================================================================
  6764. Date:         Thu, 21 Apr 1994 06:38:00 PDT
  6765. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6766. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6767. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  6768. Subject:      Re: Can't get script to run!! Why?
  6769.  
  6770. >Help! This is driving me nuts!
  6771. >They say to go into the Script Editor, enter "RECORD" mode, and then
  6772. >fire up the Scriptable Text Editor, type some text, change the style.
  6773. >Then, stop recording.
  6774. >
  6775. >Now. I have a simple script that looks like this:
  6776. >
  6777. >        tell application "Scriptable Text Editor"
  6778. >                activate
  6779. >                set selection to "Welcome to AppleScript"
  6780. >                select word 3 of document 1
  6781. >                set style of selection to italic
  6782. >        end tell
  6783. >
  6784. >I save it as an Application called "My First Script", then I quit the
  6785. >editor. Both editors, in fact.
  6786. >
  6787. >Now. Whenever I double-click on the "My First Script" application, it
  6788. >brings up the title box, and I click on "Run". It then immediately
  6789. >quits, doing nothing.
  6790.  
  6791. You've run into a bug in AppleScript/Script Editor.  Running recorded scripts
  6792. which are compiled for you during the record process does not always work.
  6793. The work around is to simply re-compile the script using the Script Editor.
  6794.  
  6795. Sad but true.
  6796.  
  6797. -Mark
  6798. =========================================================================
  6799. Date:         Thu, 21 Apr 1994 10:59:09 -0500
  6800. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6801. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6802. From:         K J Fox <kjfox@MKE.AB.COM>
  6803. Subject:      Speech Macro Editor variables
  6804.  
  6805. Hi,
  6806. I'm exploring AppleScripting with a 660AV Mac and am writing speech
  6807. macros to do various things.  One useful thing would be if the ability
  6808. is there to pass variables into the script from the recognized speech.
  6809.  
  6810. As an example, I wrote a script that "tells" hypercard to do a database
  6811. lookup of a project.  The macro is called "lookup project XYZ".  If my
  6812. database contains 2000 projects then I need 2000 speech macros unless I
  6813. can create a generic "lookup" macro where the second word is a parameter
  6814. that it can decipher into text.
  6815.  
  6816. Is anyone aware of this shortcoming and is there a way around this?
  6817. Are there any speech script additions that handle this sort of thing??
  6818.  
  6819. Ken
  6820.  
  6821. ________________________________________________________________________
  6822. Kenneth J. Fox         |     E-mail:  kjfox@mke.ab.com (pref)
  6823. Allen-Bradley Company  |      Phone:  414-382-3287 (V) 414-382-2742 (F)
  6824. Rockwell Int'l         |      Pager:  414-256-9702
  6825. Milwaukee, WI          |  Applelink:  FOX.K
  6826. =========================================================================
  6827. Date:         Thu, 21 Apr 1994 09:41:14 -0700
  6828. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6829. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6830. From:         Doug Baron <userland@NETCOM.COM>
  6831. Subject:      Re: Hiding Apps from Frontier
  6832. In-Reply-To:  <199404211040.DAA24842@mail.netcom.com> from "Jeremy Quinn" at
  6833.               Apr 21, 94 11:26:47 am
  6834.  
  6835. >
  6836. > Does anybody know how to hide an application from Frntier? I know it can be
  6837. > done by getting Frontier to tell Quickeys to do the hiding, but I find this
  6838. > technique inelegant, wasteful and risky!
  6839. >
  6840. > I expected to find a command like Finder.hide(appID)/Finder.show(appID).
  6841. >
  6842. > Thanks  Jeremy Quinn
  6843. >
  6844. There is a UCMD for Frontier called appMenu that gives you control over
  6845. the system's Application menu. With it installed, you can say:
  6846.  
  6847.    appMenu.select ("Hide UserLand Frontier")
  6848.  
  6849. or select any other item in the menu. To hide a specific app, you need to
  6850. bring it to the front first, so that the Hide item will operate on it.
  6851.  
  6852. Doug Baron
  6853. =========================================================================
  6854. Date:         Thu, 21 Apr 1994 09:45:43 -0700
  6855. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6856. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6857. From:         Doug Baron <userland@NETCOM.COM>
  6858. Subject:      Re: "keyword" parameter in Frontier Script
  6859. In-Reply-To:  <199404210757.AAA14024@mail.netcom.com> from "Jean-Michel Beuken"
  6860.               at Apr 21, 94 09:53:57 am
  6861.  
  6862. >
  6863. >
  6864. > How is it possible to use the "keyword" parameter in Frontier Script ?
  6865. > Here above, You can see a piece of code to send a AppleEvent to Frontier.
  6866. > I create an script in 'system.verbs.traps.igor.test'
  6867. > All work perfectly ! Frontier receives the two parameters and the
  6868. > application receive well the returned parameter.
  6869. > But my question is : is it possible in Frontier to know the "keyword" (here
  6870. > 'typl' or 'typs') associated to the value ?
  6871. >
  6872. >
  6873.  
  6874. It's not possible to deterimine the keywords associated with parameters
  6875. to trap scripts. But the trap "script" itself can be a UCMD, in which
  6876. case your C code could extract the parameter keys.
  6877.  
  6878. Doug Baron
  6879. =========================================================================
  6880. Date:         Thu, 21 Apr 1994 11:04:34 PDT
  6881. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6882. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6883. From:         James Glidewell <jbg@SDC.CS.BOEING.COM>
  6884. Subject:      Embedding QK scripts in AppleScript
  6885.  
  6886. I finally decided to get a copy of Quickeys 3.0 to
  6887. allow myself better control of various non-scriptable
  6888. apps that I use. In general, I have been quite happy
  6889. with QK and it does appear to fill a major gap in my
  6890. ability to use AS for some day to day tasks.
  6891.  
  6892. However...
  6893.  
  6894. I have not figured out a way to embed QK scripts inside
  6895. a AS script. The QK scripting docs give an example of how
  6896. to embed an AS script inside a QK script, but not vice-versa.
  6897.  
  6898. What I want to do is use AS as a looping construct and
  6899. invoke the QK script for each item (file, ...). It would be very
  6900. nice to be able to actually include the QK OSA script directly
  6901. in my AS script, rather than calling a named Quickkey. I really
  6902. don't want to define a lot of 1-shot QK scripts, all installed
  6903. separately, as this seems to be an organiztional nightmare.
  6904.  
  6905. Is there a way to mix & match OSA "dialects" in a single
  6906. script using the script editor?
  6907.  
  6908. Sorry if this has been hashed over many times before - I did
  6909. a careful study of the QK docs and my meager macscrpt archives
  6910. and could find nothing...
  6911.  
  6912. Thanks,
  6913. Jim Glidewell
  6914. jbg@sdc.cs.boeing.com
  6915. =========================================================================
  6916. Date:         Thu, 21 Apr 1994 13:53:34 -0500
  6917. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6918. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6919. From:         Fred Terry <pfterry@LKS.CSI.COM>
  6920. Subject:      Re: Embedding QK scripts in AppleScript
  6921. In-Reply-To:  Your message of "Thu, 21 Apr 94 11:04:34 PDT"
  6922.  
  6923. >I finally decided to get a copy of Quickeys 3.0 to
  6924. >allow myself better control of various non-scriptable
  6925. >apps that I use. In general, I have been quite happy
  6926. >with QK and it does appear to fill a major gap in my
  6927. >ability to use AS for some day to day tasks.
  6928. >
  6929. >However...
  6930. >
  6931. >I have not figured out a way to embed QK scripts inside
  6932. >a AS script. The QK scripting docs give an example of how
  6933. >to embed an AS script inside a QK script, but not vice-versa.
  6934. >
  6935. >What I want to do is use AS as a looping construct and
  6936. >invoke the QK script for each item (file, ...). It would be very
  6937. >nice to be able to actually include the QK OSA script directly
  6938. >in my AS script, rather than calling a named Quickkey. I really
  6939. >don't want to define a lot of 1-shot QK scripts, all installed
  6940. >separately, as this seems to be an organiztional nightmare.
  6941. >
  6942. >Is there a way to mix & match OSA "dialects" in a single
  6943. >script using the script editor?
  6944. >
  6945.  
  6946. You will need to use the run script command. The syntax is something like
  6947.  
  6948.  run script <file ref | script string>
  6949.         [with parameters <list>] [in <component name>]
  6950.  
  6951. After you have QuicKeys installed, open the Script Editor and select QuicKeys
  6952. from the OSA pop-up menu. Then perform the actions that you want to embed.
  6953. That'll get you the QuicKeys script.
  6954.  
  6955. To embed it in an AppleScript, you will need to do something like
  6956.  
  6957. run script "
  6958.  
  6959. [the quickeys script]
  6960.  
  6961. " in "QuicKeys"
  6962.  
  6963. You will also need to place a \ before all of the quotes in the QuicKeys
  6964. script. For instance,
  6965.  
  6966. Wait Application \"Adobe Photoshop 2.0.1\"
  6967.  
  6968. Otherwise, AppleScript gets very confused (<- a technical description of what
  6969. occurs). When you are recording your QuicKeys script, perform your actions
  6970. slowly and use keyboard commands whenever you can.
  6971.  
  6972. Sorry I can't be more specific, but I don't have a Mac handy at the moment.
  6973. This is in the next rev of the faq--which I'm hoping to upload tonight.
  6974.  
  6975. pf
  6976.  
  6977.  
  6978. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6979. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  6980. =========================================================================
  6981. Date:         Thu, 21 Apr 1994 14:13:16 -0500
  6982. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6983. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6984. From:         Fred Terry <pfterry@LKS.CSI.COM>
  6985. Subject:      QuarkXPress scripts
  6986.  
  6987. I have uploaded a set of scripts for QuarkXPress to gaea. You'll find them in
  6988.  
  6989. ftp://gaea.kgs.ukans.edu/applescript/scripts/QuarkScripts.sit.hqx
  6990.  
  6991. These scripts were written by James Teters <JTeters@aol.com> and require
  6992. XPress, QuicKeys, and AppleScript. They have been saved as run only. There are
  6993. scripts that
  6994.  
  6995.      -Find/Replace the color and shade of Text, Backgrounds, lines, and frames
  6996. individually.
  6997.      -Create, delete, and copy guides.
  6998.      -Change the background color, background shade, frame shade, frame width,
  6999. frame shade, line width, rotation, and other items with a single keystroke.
  7000.      -Change the column count, runaround, vertical justification, and text
  7001. inset (with different values for the top, left, bottom and right insets) of a
  7002. text bo
  7003. x from a single dialog box.
  7004.  
  7005. There are 24 scripts in all and a scripting addition is included.
  7006.  
  7007. Enjoy.
  7008.  
  7009. pf
  7010.  
  7011. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7012. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  7013. =========================================================================
  7014. Date:         Thu, 21 Apr 1994 14:33:05 U
  7015. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7016. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7017. From:         mark stewart <mark_stewart@BIAD23.UTHSCSA.EDU>
  7018. Subject:      comparing dates
  7019.  
  7020.                       comparing dates
  7021. Folks,
  7022. I'm developing a generic suite of scripts that work in conjunction with StepUp
  7023. Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
  7024. 3.01.
  7025. The core script polls the contents of a user's mailbox and creates a table of
  7026. records, one record for each mail message. I would like to then be able to
  7027. filter messages on the basis of when they were received. Thus I am trying to
  7028. figure out how to compare dates to see which is more recent. Does anybody have
  7029. any good algorithms for doing this or know of a verb that I wasn't aware of
  7030. that handles it?
  7031.  
  7032. Mark Stewart
  7033. BIAD-Research Imaging Center
  7034. UTHSCSA
  7035.  
  7036. P.S. AppleScript solutions are equally welcome!
  7037. =========================================================================
  7038. Date:         Thu, 21 Apr 1994 12:01:38 PDT
  7039. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7040. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7041. From:         network_manager@ALDUS.COM
  7042. Organization: Aldus Corporation, Seattle, WA
  7043. Subject:      NDN:Re: Embedding QK scripts in AppleScript
  7044.  
  7045. Your mail to the Microsoft Mail Server could not be fully
  7046. delivered!   No Valid Addresses!   It has been deleted.
  7047.  
  7048. Error List:
  7049.   Bad 'To:' Address: david.rogers@MSM-Inter
  7050. =========================================================================
  7051. Date:         Thu, 21 Apr 1994 15:50:09 -0700
  7052. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7053. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7054. From:         Doug Baron <userland@NETCOM.COM>
  7055. Subject:      Re: comparing dates
  7056. In-Reply-To:  <199404211932.MAA08278@netcom10.netcom.com> from "mark stewart"
  7057.               at Apr 21, 94 02:33:05 pm
  7058.  
  7059. >
  7060. >                       comparing dates
  7061. > Folks,
  7062. > I'm developing a generic suite of scripts that work in conjunction with 
  7063. StepUp
  7064. > Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
  7065. > 3.01.
  7066. > The core script polls the contents of a user's mailbox and creates a table of
  7067. > records, one record for each mail message. I would like to then be able to
  7068. > filter messages on the basis of when they were received. Thus I am trying to
  7069. > figure out how to compare dates to see which is more recent. Does anybody 
  7070. have
  7071. > any good algorithms for doing this or know of a verb that I wasn't aware of
  7072. > that handles it?
  7073. >
  7074. >
  7075. Assuming that the dates are currently stored as strings and use
  7076. reasonable standard notation, all you need to do is coerce them to dates
  7077. and compare the date values. If d1 and d2 are both date strings, you can
  7078. compare them like this:
  7079.  
  7080.        if date (d2) > date (d1)
  7081.             msg (d2 + " is newer than " + d1)
  7082.  
  7083. No algorithms required!
  7084.  
  7085. Doug
  7086. =========================================================================
  7087. Date:         Fri, 22 Apr 1994 08:32:29 -0500
  7088. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7089. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7090. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  7091. Subject:      renaming files with finder scripting
  7092.  
  7093. Hello,
  7094.  
  7095.  I am using AppleScript 1.1 and the Finder Scripting Extension with System
  7096. 7 pro to do some stuff. I want to duplicate a file and give it a name that
  7097. I want, not just the usually "Old Name copy". I thought the code below
  7098. would work but it doesn't work. The "set name  of " does nothing. I still
  7099. have a duplicate file with the name "Old Name copy."
  7100.  
  7101. ======
  7102.  
  7103. -- Does not work
  7104.  
  7105. tell application "Finder"
  7106.         activate
  7107.         set newFile to duplicate file "Old File" of folder "Some Folder" of
  7108. disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  7109.         set name of newFile to "junk"
  7110. end tell
  7111.  
  7112. =====
  7113.  
  7114.  
  7115. Here is the work-around that I came up with. This works. But why should I
  7116. have to do this ? Is there a more direct way to do what I want to do ?
  7117.  
  7118. Thanks !
  7119.  
  7120. =====
  7121.  
  7122. -- The work around
  7123.  
  7124. tell application "Finder"
  7125.         activate
  7126.         set newFile to duplicate file "Old File" of folder "Some Folder" of
  7127. disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  7128.         set selection to newFile
  7129.         set name of selection to "junk"
  7130. end tell
  7131.  
  7132. ======
  7133.  
  7134.  
  7135. --
  7136. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  7137. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  7138. sshws@convx1.lerc.nasa.gov
  7139. AppleLink: SCHILLING.H
  7140. =========================================================================
  7141. Date:         Fri, 22 Apr 1994 10:09:28 -0400
  7142. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7143. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7144. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  7145. Subject:      Re: renaming files with finder scripting
  7146. In-Reply-To:  <no.id> from "Herb Schilling" at Apr 22, 94 08:32:29 am
  7147.  
  7148. --Herb Schilling wrote:
  7149. >
  7150. > I am using AppleScript 1.1 and the Finder Scripting Extension with System
  7151. >7 pro to do some stuff. I want to duplicate a file and give it a name that
  7152. >I want, not just the usually "Old Name copy". I thought the code below
  7153. >would work but it doesn't work. The "set name  of " does nothing. I still
  7154. >have a duplicate file with the name "Old Name copy."
  7155. >
  7156. >tell application "Finder"
  7157. >        activate
  7158. >        set newFile to duplicate file "Old File" of folder "Some Folder" of
  7159. >disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  7160. >        set name of newFile to "junk"
  7161. >end tell
  7162.  
  7163.     Make this one simple change, and your life will become much easier:
  7164. add "replacing conflicts" to the end of your duplicate command. Without
  7165. this added on the end the duplicate command will leave you with the name
  7166. of the file selected in the Finder, instead of the actual file selected.
  7167. I know this sounds a bit confusing, but that's how the Finder works when
  7168. it duplicates a file. The work around that you come up with forced the
  7169. Finder to select the file, which allows you to then operate on it from
  7170. AppleScript.
  7171.  
  7172. -Hades
  7173. =========================================================================
  7174. Date:         Fri, 22 Apr 1994 07:52:39 U
  7175. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7176. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7177. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  7178. Subject:      Coercing into a reference.
  7179.  
  7180. Coercing into a reference.
  7181. I've got an interesting problem:
  7182. I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  7183. to count the instances of each different answer in a field called 'product'.
  7184. It's not *that* difficult, since there's only 14 different products (and it's
  7185. not easy enough to be done through an FMPro script).
  7186. The way I have it done now is by defining 14 variables, with names that are,
  7187. conveniently, the contents of the product field.  In other words, I have a
  7188. variable called "ADM" to store the number of records with "ADM" in the
  7189. product field, etc.
  7190.  
  7191. So I process each record in the file, and do a comparison.  It looks
  7192. something like this:
  7193. if cell product is "ADM" then
  7194.      set ADM to ADM + 1
  7195. else if cell product is "ADW" then
  7196.      set ADW to ADW + 1
  7197. .....
  7198. else
  7199.      set STW to STW + 1
  7200. end if
  7201.  
  7202. This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  7203. records/second.  I'd like to make it faster, and I'd love to just tell AS
  7204. "use whatever is in the product cell as a *variable name* to play with."
  7205. Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  7206. Applescript), you can't coerce into a variable.  Ideally, it would be
  7207. something like
  7208. set (cell product as variable) to (cell product as variable) + 1
  7209. but I don't think I can do that.
  7210.  
  7211. Suggestions? Comments? Sneering remarks about newbies? :)
  7212.  
  7213. -roy
  7214. =========================================================================
  7215. Date:         Fri, 22 Apr 1994 11:21:53 -0400
  7216. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7217. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7218. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  7219. Subject:      Re: Coercing into a reference.
  7220. In-Reply-To:  <no.id> from "Roy Rapoport" at Apr 22, 94 07:52:39 am
  7221.  
  7222. --Roy Rapoport wrote:
  7223. >
  7224. >So I process each record in the file, and do a comparison.  It looks
  7225. >something like this:
  7226. >if cell product is "ADM" then
  7227. >     set ADM to ADM + 1
  7228. >else if cell product is "ADW" then
  7229. >     set ADW to ADW + 1
  7230. >.....
  7231. >else
  7232. >     set STW to STW + 1
  7233. >end if
  7234. >
  7235. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  7236. >records/second.  I'd like to make it faster, and I'd love to just tell AS
  7237. >"use whatever is in the product cell as a *variable name* to play with."
  7238. >Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  7239. >Applescript), you can't coerce into a variable.  Ideally, it would be
  7240. >something like
  7241. >set (cell product as variable) to (cell product as variable) + 1
  7242. >but I don't think I can do that.
  7243.  
  7244.     You've just hit one of the really large walls in AppleScript. This
  7245. kind of processing can only be done with multiple if statements. What
  7246. you can do to speed this up is get the contents of the field into a a
  7247. variable and then process the if statements on the variable. Calling the
  7248. get data function for each if statement is what is really slowing you
  7249. down.
  7250.     Of course, this would all be a lot easier if AppleScript had a good
  7251. "case of" conditional like Frontier does.
  7252.  
  7253. -Hades
  7254. =========================================================================
  7255. Date:         Fri, 22 Apr 1994 11:56:24 -0400
  7256. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7257. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7258. From:         "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
  7259. Subject:      Re: Coercing into a reference.
  7260.  
  7261. >Coercing into a reference.
  7262. >I've got an interesting problem:
  7263. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  7264. >to count the instances of each different answer in a field called 'product'.
  7265. >It's not *that* difficult, since there's only 14 different products (and it's
  7266. >not easy enough to be done through an FMPro script).
  7267. >The way I have it done now is by defining 14 variables, with names that are,
  7268. >conveniently, the contents of the product field.  In other words, I have a
  7269. >variable called "ADM" to store the number of records with "ADM" in the
  7270. >product field, etc.
  7271. >
  7272. >So I process each record in the file, and do a comparison.  It looks
  7273. >something like this:
  7274. >if cell product is "ADM" then
  7275. >     set ADM to ADM + 1
  7276. >else if cell product is "ADW" then
  7277. >     set ADW to ADW + 1
  7278. >.....
  7279. >else
  7280. >     set STW to STW + 1
  7281. >end if
  7282. >
  7283. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  7284. >records/second.  I'd like to make it faster, and I'd love to just tell AS
  7285. >"use whatever is in the product cell as a *variable name* to play with."
  7286. >Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  7287. >Applescript), you can't coerce into a variable.  Ideally, it would be
  7288. >something like
  7289. >set (cell product as variable) to (cell product as variable) + 1
  7290. >but I don't think I can do that.
  7291. >
  7292. >Suggestions? Comments? Sneering remarks about newbies? :)
  7293.  
  7294. It seems to me that you are taking a somewhat more complicated approach
  7295. than necessary.  Can't you get FileMaker Pro to provide the same
  7296. information for you using its summary fields?  This will be a more
  7297. straight-forward (and FASTER) approach than trying to get AppleScript to do
  7298. it.
  7299.  
  7300. Lee.
  7301.  
  7302. Lee K. Hoong
  7303. Dept. of Chemistry, Emory University
  7304. Internet: lhoong@unix.cc.emory.edu  |  America On-line: LHOONG
  7305. Disclaimer: I speak for myself only, not for Emory University
  7306. =========================================================================
  7307. Date:         Fri, 22 Apr 1994 10:37:23 -0700
  7308. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7309. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7310. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7311. Subject:      Re: Coercing into a reference.
  7312.  
  7313. At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  7314. >I've got an interesting problem:
  7315. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  7316. >to count the instances of each different answer in a field called 'product'.
  7317. >It's not *that* difficult, since there's only 14 different products (and it's
  7318. >not easy enough to be done through an FMPro script).
  7319.  
  7320. The suggestion to copy the cell into a variable before the cascaded if will
  7321. certainly help.  If the database is not too big, you can proceed like this,
  7322. which should be faster still:
  7323.  
  7324.    copy  (field "foo" of database "bar") to theField  -- maybe a specific 
  7325. layout
  7326.  
  7327.    repeat with x in theField
  7328.  
  7329.        if x = "ADM" -- etc the if cascade as before
  7330.  
  7331. If the database is too big, the list that comes back from the get will
  7332. cause memory problems.
  7333.  
  7334. Now let's tackle the if cascade.
  7335.  
  7336. Suppose you define an AppleScript record:
  7337.  
  7338. set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  7339.                                       --AppleScript words or FileMaker words
  7340.  
  7341. something like
  7342.  
  7343. repeat with x in theField -- as before, theField is extracted as a list
  7344.                           -- from FileMaker
  7345.    set item x of totals to item x of totals + 1
  7346.  
  7347. A try statement around that would be a good idea, to handle unknown field
  7348. contents.  In fact, you could start out with an empty record, and let the
  7349. on error part of the try construct add items as new field contents are
  7350. encountered.
  7351.  
  7352. I haven't proven that the record idea will work, but it should.  The get
  7353. field "foo" and the repeat with x in theField ideas have been demonstrated.
  7354.  
  7355.    --John
  7356.  
  7357. --
  7358. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7359. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7360. =========================================================================
  7361. Date:         Fri, 22 Apr 1994 12:52:23 -0500
  7362. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7363. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7364. From:         Fred Terry <pfterry@LKS.CSI.COM>
  7365. Subject:      Speech Manager
  7366.  
  7367. How can I let my Mac talk to me in AppleScripts?
  7368. Isn't there a command <<say "Hello, world">> or
  7369. something, or an OSAX to work with Speech Manager?
  7370.  
  7371. Jan.
  7372.  
  7373.  
  7374.  
  7375.  
  7376. Jan Dockx       (Jan.Dockx@cs.kuleuven.ac.be)
  7377. K.U.Leuven; Department of Computer Science
  7378. Celestijnenlaan 200A / L00.10
  7379. 3001 Heverlee
  7380. Belgium
  7381. tel.: ++ 32/16/20 10 15     x3596
  7382. ----------------------------------------------
  7383. The EROOS Research Group can be contacted
  7384. through e-mail at:
  7385. eroos_contact@cs.kuleuven.ac.be
  7386. or through regular mail at:
  7387. Research Group Software Development Methods
  7388. K.U.Leuven; Department of Computer Science
  7389. Celestijnenlaan 200A
  7390. 3001 Heverlee
  7391. Belgium
  7392.  
  7393. ==============================================
  7394.  
  7395. Wisdom is not beauty ...
  7396. =========================================================================
  7397. Date:         Fri, 22 Apr 1994 14:37:45 -0400
  7398. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7399. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7400. From:         John Schettino <js12@GTE.COM>
  7401. Subject:      Re: Coercing into a reference.
  7402.  
  7403. >At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  7404. >Now let's tackle the if cascade.
  7405. >
  7406. >Suppose you define an AppleScript record:
  7407. >
  7408. >set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  7409. >                                      --AppleScript words or FileMaker words
  7410. >
  7411. >something like
  7412. >
  7413. >repeat with x in theField -- as before, theField is extracted as a list
  7414. >                          -- from FileMaker
  7415. >   set item x of totals to item x of totals + 1
  7416. >
  7417. >A try statement around that would be a good idea, to handle unknown field
  7418. >contents.  In fact, you could start out with an empty record, and let the
  7419. >on error part of the try construct add items as new field contents are
  7420. >encountered.
  7421. >
  7422. >I haven't proven that the record idea will work, but it should.  The get
  7423. >field "foo" and the repeat with x in theField ideas have been demonstrated.
  7424.  
  7425. Bzzt! Thank you for playing!
  7426.  
  7427. "Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
  7428. \"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
  7429.  
  7430. This was the test code:
  7431. set totals to {ADM:0, STW:0}
  7432. set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  7433.  
  7434. try
  7435.         repeat with x in theField -- as before, theField is extracted as a list
  7436.                 set item x of totals to (item x of totals) + 1
  7437.                 set totals's x to foo + 1
  7438.         end repeat
  7439. on error str
  7440.         str
  7441. end try
  7442.  
  7443. What we really need is a "contains" command that does a lookup of a string
  7444. in a list to return the OFFSET or ITEM number of the string in the list.
  7445. Does such a beast exist? if so then you could well code something like
  7446. this:
  7447.  
  7448.  
  7449. -- note: I'd like an osax for this function... any C programmers interested?
  7450.  
  7451. on listOffset(str, lst)
  7452.         repeat with x from 1 to number of items in lst
  7453.                 if (str contains (item x of lst)) then
  7454.                         return x
  7455.                 end if
  7456.         end repeat
  7457.         return 0
  7458. end listOffset
  7459.  
  7460. -- here's some test code
  7461.  
  7462. set totals to {0, 0} -- how ever many are needed
  7463. set theFieldNames to {"ADM", "STW"} -- the actual values
  7464.  
  7465. -- our test data
  7466. set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  7467.  
  7468. repeat with x in theField -- as before, theField is extracted as a list
  7469.         set totalItem to listOffset(x, theFieldNames)
  7470.         if (totalItem = 0) then error -- here we have a new field, we could
  7471. just extend our lists
  7472.         set item totalItem of totals to (item totalItem of totals) + 1
  7473. end repeat
  7474.  
  7475. -- this just tests the results
  7476. totals -- prints {3,5} in result window as expected
  7477.  
  7478.  
  7479. - john
  7480.  
  7481. -----------------------------------------
  7482. js12@gte.com             GTE Laboratories
  7483. John Schettino                Waltham, MA
  7484. =========================================================================
  7485. Date:         Fri, 22 Apr 1994 12:01:03 -0700
  7486. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7487. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7488. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7489. Subject:      Re: Coercing into a reference.
  7490.  
  7491. At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  7492. >Coercing into a reference.
  7493. >I've got an interesting problem:
  7494. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  7495. >to count the instances of each different answer in a field called 'product'.
  7496. >It's not *that* difficult, since there's only 14 different products (and it's
  7497. >not easy enough to be done through an FMPro script).
  7498. >The way I have it done now is by defining 14 variables, with names that are,
  7499. >conveniently, the contents of the product field.  In other words, I have a
  7500. >variable called "ADM" to store the number of records with "ADM" in the
  7501. >product field, etc.
  7502.  
  7503.  
  7504. In a prior response, I suggested that a record could be used to hold the
  7505. totals, rather than individual variables.  I have not been able to convince
  7506. AppleScript to do what I want it to do.  I guess that's what I get for
  7507. assuming that because something is easy in Frontier that it is likely to be
  7508. possible in AppleScript.  I may yet have missed the magic which allows a
  7509. record to be used here.  It's probably best to stick to the cascade of ifs,
  7510. which you already have working.
  7511.  
  7512.  
  7513. [Actually, in Frontier, I would use a table rather than a record, although
  7514. either would work.]
  7515.  
  7516.   --John
  7517.  
  7518. --
  7519. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7520. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7521. =========================================================================
  7522. Date:         Fri, 22 Apr 1994 14:28:17 -0700
  7523. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7524. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7525. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7526. Subject:      Re: Coercing into a reference.
  7527.  
  7528. >>I said this:
  7529. >>Now let's tackle the if cascade.
  7530. >>
  7531. >>Suppose you define an AppleScript record:
  7532. >>
  7533. >>set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  7534. >>                                      --AppleScript words or FileMaker words
  7535. >>
  7536. >>something like
  7537. >>
  7538. >>repeat with x in theField -- as before, theField is extracted as a list
  7539. >>                          -- from FileMaker
  7540. >>   set item x of totals to item x of totals + 1
  7541. >>
  7542. >>A try statement around that would be a good idea, to handle unknown field
  7543. >>contents.  In fact, you could start out with an empty record, and let the
  7544. >>on error part of the try construct add items as new field contents are
  7545. >>encountered.
  7546. >>
  7547. >>I haven't proven that the record idea will work, but it should.  The get
  7548. >>field "foo" and the repeat with x in theField ideas have been demonstrated.
  7549.  
  7550. And John Schettino correctly said
  7551. >Bzzt! Thank you for playing!
  7552. >
  7553. >"Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
  7554. >\"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
  7555. >
  7556. >This was the test code:
  7557. >set totals to {ADM:0, STW:0}
  7558. >set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  7559. >
  7560. >try
  7561. >        repeat with x in theField -- as before, theField is extracted as a 
  7562. list
  7563. >                set item x of totals to (item x of totals) + 1
  7564. >                set totals's x to foo + 1
  7565. >        end repeat
  7566. >on error str
  7567. >        str
  7568. >end try
  7569.  
  7570.  
  7571. However, we can build something based on this pattern:
  7572.  
  7573. (* counts is a list of records.  Each record is of the form
  7574.      xname:  some string
  7575.      xcount:  an integer
  7576.      *)
  7577.  
  7578. set counts to {}
  7579.  
  7580. set test to {"foo", "bar", "foo", "baz", "foo"}
  7581.  
  7582. repeat with x in test
  7583.     increment(x as string)
  7584. end repeat
  7585.  
  7586. on increment(aName) -- increment the count for record named name in counts
  7587.     global counts
  7588.     repeat with x in counts -- could/should use a binary search here
  7589.         if xname of x = aName then
  7590.             set xcount of x to (xcount of x) + 1
  7591.             return xcount of x
  7592.         end if
  7593.     end repeat
  7594.     set counts to counts & {{xname:aName, xcount:1}}
  7595.     return 1
  7596. end increment
  7597.  
  7598.  
  7599. counts
  7600.  
  7601.  
  7602. The above test puts the following into the result window of the AppleScript
  7603. Script Editor:
  7604.  
  7605. {{xname:"foo", xcount:3}, {xname:"bar", xcount:1}, {xname:"baz", xcount:1}}
  7606.  
  7607. Testing would have to establish at what point a binary search might become
  7608. desirable in the counts list, remembering that building the list then
  7609. becomes slower.  I suspect that a linear search is better until the list
  7610. becomes quite large.
  7611.  
  7612.     --John
  7613.  
  7614. --
  7615. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7616. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7617. =========================================================================
  7618. Date:         Fri, 22 Apr 1994 16:57:01 -0500
  7619. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7620. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7621. From:         Igor Livshits <igorl@UIUC.EDU>
  7622. Subject:      Clipboard juggling
  7623.  
  7624. Howdy,
  7625.  
  7626. I am trying to use MenuEvents and Jon's Commands in tandem to copy selected
  7627. text within an active window to the clipboard. Then, I place the contents
  7628. of the clipboard into a string variable and pass it as an argument to a
  7629. command directed to another application.
  7630.  
  7631. The text definitely gets copied, but the application does not put the
  7632. contents into the system scrap, rather it keep is locally. I thought that
  7633. actiavting/deactivating between two apps would force the first application
  7634. to set system scrap to its local scrap as it surrenders its foreground
  7635. status, but is not the case.
  7636.  
  7637. Here's what happens:
  7638.  
  7639. 1. The script runs, and the copy is performed via MenuEvents in app1
  7640.  
  7641. 2. App2 is activated, but the clipboard contains old system scrap data
  7642.  
  7643. 3. If I manually bring app1 to the foreground and then manually bring app2
  7644. to the foreground (no other actions in between), the system scrap will
  7645. contain new data.
  7646.  
  7647. Because of this, I cannot use Jon's Commands' the clipboard OSAX as it
  7648. seems to work with system scrap only. Forcing several iterations of
  7649. activate app1, activate app2 does not help at all.
  7650.  
  7651. So, is there a way to force an application to update system scrap?
  7652.  
  7653. Below are two AS handlers that do the work:
  7654.  
  7655. --
  7656.  
  7657. on CopiedSelection()
  7658.   global menuID, itemID, hostApplication, selectedURL
  7659.  
  7660.   try
  7661.     tell application hostApplication
  7662.       activate
  7663.       Select Menu Item menu id menuID menu item id itemID -- copy the URL
  7664. to the clipboard
  7665.       set selectedURL to (the clipboard as string) -- make local copy of
  7666. the selection
  7667.       return true
  7668.     end tell
  7669.   on error
  7670.     return false
  7671.   end try
  7672. end CopiedSelection
  7673.  
  7674. --
  7675.  
  7676. on FetchSelection()
  7677.   global selectedURL
  7678.  
  7679.   try
  7680.     tell application "Anarchie"
  7681.       activate
  7682.       --fetch url selectedURL
  7683.     end tell
  7684.   on error errorString number errorNumber
  7685.     -- better error handling under construction
  7686.     error errorString number errorNumber
  7687.   end try
  7688. end FetchSelection
  7689.  
  7690. --
  7691.  
  7692. I'll send the full script to anyone interested.
  7693.  
  7694. Thanks for your help, Igor
  7695.  
  7696. _____
  7697. NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424;  Have a Coke and a smile :)
  7698. =========================================================================
  7699. Date:         Fri, 22 Apr 1994 16:33:24 U
  7700. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7701. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7702. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  7703. Subject:      Converting to Uppercase
  7704.  
  7705. Converting to Uppercase
  7706. Is there any function in applescript that converts letters/words to capital
  7707. letters? something like,
  7708. copy capitalize string to string2
  7709. so if string is "string", string2 would be "STRING"...
  7710.  
  7711. -roy
  7712. =========================================================================
  7713. Date:         Fri, 22 Apr 1994 20:06:20 U
  7714. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7715. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7716. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  7717. Subject:      2 simple (?) questions
  7718.  
  7719. 2 simple (?) questions
  7720. Firstly, I need to tell AS to show all records in an FMPro Dbase whose field
  7721. product is equal to something.  I was using something like this:
  7722. show (every record whose field product is "ADM")
  7723.  
  7724. The problem is that this catches both field product "ADM" and field product
  7725. "ADMB".  Is there any way to tell it I want an exact match? I tried using
  7726. 'exactly' :)
  7727.  
  7728. I think I've just forgotten the second question.  Nevermind ... :)
  7729.  
  7730. -roy
  7731. =========================================================================
  7732. Date:         Sat, 23 Apr 1994 14:23:00 PDT
  7733. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7734. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7735. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  7736. Subject:      Re: Speech Manager
  7737.  
  7738. > How can I let my Mac talk to me in AppleScripts?
  7739. > Isn't there a command <<say "Hello, world">> or
  7740. > something, or an OSAX to work with Speech Manager?
  7741.  
  7742. Try the speak command in Script Tools 1.3 or later.
  7743.  
  7744. Cheers
  7745. -Mark
  7746. =========================================================================
  7747. Date:         Thu, 21 Jul 1994 18:17:23 +1100
  7748. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7749. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7750. From:         Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
  7751. Subject:      Looking for Eudora Scripts
  7752.  
  7753. Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  7754. some intelligent things with my mail - eg if it's from a listServ address
  7755. automatically file it in the appropriate mail-box.
  7756.  
  7757. Any ideas?
  7758.  
  7759. Cheers,
  7760.  
  7761. Michael Norris,
  7762. CAL Consultant,
  7763. University of Otago,
  7764. PO Box 56,
  7765. Dunedin,
  7766. New Zealand.
  7767. ---------------------
  7768. Ph:(03) 479-7705
  7769. E-Mail: michael.norris@stonebow.otago.ac.nz
  7770. =========================================================================
  7771. Date:         Mon, 25 Apr 1994 04:49:21 -0400
  7772. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7773. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7774. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  7775. Subject:      Scriptable Finger app or osax
  7776.  
  7777. Hi,
  7778.  
  7779.         Does anyone out there know of a scriptable finger application or
  7780. OSAX?  I'd like to be able to finger someone through a script, preferrably
  7781. through an OSAX, but I'll take whatever I can get.
  7782.  
  7783.         Baring a pre-made solution, does anyone know where I can get source
  7784. code in C to such an application?  Peter Lewis's excellent app "Finger"
  7785. unfortunately does not currently support scripting, and was written in
  7786. Pascal so I can't even hack his code.  (I don't have a Pascal compiler)
  7787.  
  7788.         Thanks,
  7789.           Sam
  7790. =========================================================================
  7791. Date:         Mon, 25 Apr 1994 12:11:51 +0000
  7792. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7793. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7794. From:         Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
  7795. Subject:      Menu Events
  7796.  
  7797. I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  7798.  
  7799. I am having some problems using the files in the archive.
  7800.  
  7801. The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  7802. aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  7803.  
  7804. The (AppleScript) sample script will not pass the syntax check.
  7805.  
  7806. I can't really work out how to use any of it.
  7807. Has anyone got any sample scripts for Frontier?
  7808.  
  7809. Thanks Jeremy
  7810.  
  7811.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  7812.              Jeremy Quinn             :              Internet:
  7813.             3D/Interactive            :       jermq@media.demon.co.uk
  7814.               Designer &              :               Phone:
  7815.         Green Design Consultant       :           +44 71 737 6831
  7816.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  7817.       Member of O2 Global Network     :     PGP Key on public keyservers
  7818. =========================================================================
  7819. Date:         Mon, 25 Apr 1994 09:07:38 -0600
  7820. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7821. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7822. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  7823. Subject:      Re: Looking for Eudora Scripts
  7824.  
  7825. >Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  7826. >some intelligent things with my mail - eg if it's from a listServ address
  7827. >automatically file it in the appropriate mail-box.
  7828.  
  7829.  
  7830. Hello,
  7831.  
  7832. I just started using Eudora because of its scriptability. I love it!
  7833.  
  7834. Here is a quick script for sorting mail. I've edited it a bit for clarity
  7835. (and shortened some variable names so they'd fit in 80 columns!). This is a
  7836. rough script - it has not been refined and isn't necessarily very well
  7837. written, but it does its job very nicely. I use more if routines for sorting
  7838. the mail than you see here.
  7839.  
  7840. "Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
  7841. Besides communicating, I use it to notify me about a lot of things (I have
  7842. a folder-watching AppleScript that notifies me through Messenger). It is
  7843. scriptable (obviously!). It's free and available on Info-Mac's archives,
  7844. UMich and everywhere fine freeware is distributed!
  7845.  
  7846. -DM
  7847.  
  7848.  
  7849.  
  7850.  
  7851. on idle
  7852.         if "Eudora1.4.2" is in ((list applications) as string) then
  7853.                 try
  7854.                         tell application "Eudora1.4.2"
  7855.                                 with timeout of 1200 seconds
  7856.                                         set prevNoOfMsgs to number of message 
  7857. of
  7858.     mailbox "In" of mail folder ""
  7859.                                         connect
  7860.                                         set currNoOfMsgs to number of message 
  7861. of
  7862.     mailbox "In" of mail folder ""
  7863.                                         set theMessages to ""
  7864.                                         if prevNoOfMsgs =82 currNoOfMsgs then
  7865.                                                 set alertMessenger to true
  7866.                                                 set x to prevNoOfMsgs + 1
  7867.                                                 repeat (currNoOfMsgs - 
  7868. prevNoOfM
  7869.    sgs) times
  7870.                                                         set sndr to field 
  7871. "From"
  7872.     of message x of mailbox "In" of mail folder =
  7873. ""
  7874.                                                         set recip to field "To"
  7875.    of message x of mailbox "In" of mail folder "=
  7876. "
  7877.                                                         set sbjct to Subject of
  7878.    message x of mailbox "In" of mail folder ""
  7879.                                                         set theMessages to 
  7880. theMe
  7881.    ssages & sndr & return & sbjct
  7882.                                                         set x to x + 1
  7883.                                                         if sndr contains 
  7884. "mulle"
  7885.     then
  7886.                                                                 set x to x - 1
  7887.                                                                 move message x 
  7888. o
  7889.    f mailbox "In" of mail folder "" InsertHere end of
  7890. mailbox "MullNet" of mail folder ""
  7891.                                                         end if
  7892.                                                         if recip contains 
  7893. "MACSC
  7894.    RPT" then
  7895.                                                                 set x to x - 1
  7896.                                                                 move message x 
  7897. o
  7898.    f mailbox "In" of mail folder "" InsertHere end of
  7899. mailbox "AppleScript" of mail folder ""
  7900.                                                         end if
  7901.                                                 end repeat
  7902.                                         else
  7903.                                                 set alertMessenger to false
  7904.                                         end if
  7905.                                 end timeout
  7906.                         end tell
  7907.                 =09
  7908.                         if alertMessenger is true then
  7909.                                 tell application "Messenger 1.5.9"
  7910.                                         copy "*:**New Mail**" to variable 
  7911. "theSe
  7912.    nder"
  7913.                                         copy return & theMessages & "**END**" 
  7914. to
  7915.     variable "theData"
  7916.                                         copy "Message" to variable 
  7917. "theDataType"
  7918.                                         do script "receiveTheEvent"
  7919.                                 end tell
  7920.                         end if
  7921.                 on error
  7922.                 end try
  7923.         end if
  7924.         return 120 -- Idle time in seconds
  7925. end idle
  7926.  
  7927. Desmond K. Mullen - University of Minnesota, Office of Admissions
  7928. mulle009@maroon.tc.umn.edu - 612/625-0824
  7929. =========================================================================
  7930. Date:         Mon, 25 Apr 1994 10:44:55 -0500
  7931. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7932. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7933. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  7934. Subject:      Re: renaming files with finder scripting
  7935.  
  7936. >--Herb Schilling wrote:
  7937. >>
  7938. >> I am using AppleScript 1.1 and the Finder Scripting Extension with System
  7939. >>7 pro to do some stuff. I want to duplicate a file and give it a name that
  7940. >>I want, not just the usually "Old Name copy". I thought the code below
  7941. >>would work but it doesn't work. The "set name  of " does nothing. I still
  7942. >>have a duplicate file with the name "Old Name copy."
  7943. >>
  7944. >>tell application "Finder"
  7945. >>        activate
  7946. >>        set newFile to duplicate file "Old File" of folder "Some Folder" of
  7947. >>disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  7948. >>        set name of newFile to "junk"
  7949. >>end tell
  7950. >
  7951. >    Make this one simple change, and your life will become much easier:
  7952. >add "replacing conflicts" to the end of your duplicate command. Without
  7953. >this added on the end the duplicate command will leave you with the name
  7954. >of the file selected in the Finder, instead of the actual file selected.
  7955. >I know this sounds a bit confusing, but that's how the Finder works when
  7956. >it duplicates a file. The work around that you come up with forced the
  7957. >Finder to select the file, which allows you to then operate on it from
  7958. >AppleScript.
  7959. >
  7960.  
  7961. At first I wrote a simple script that made use of your suggestion and
  7962. everything worked fine. Now that I put this suggestion into my larger
  7963. script, I have the same problem as before! I have to do the selection
  7964. work-around to make it work again. Got me what is going on.
  7965.  
  7966. --
  7967. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  7968. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  7969. sshws@convx1.lerc.nasa.gov
  7970. AppleLink: SCHILLING.H
  7971. =========================================================================
  7972. Date:         Mon, 25 Apr 1994 13:21:25 -0600
  7973. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7974. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7975. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  7976. Subject:      Re: Scriptable Finger app or osax
  7977.  
  7978. >Hi,
  7979. >
  7980. >        Does anyone out there know of a scriptable finger application or
  7981. >OSAX?  I'd like to be able to finger someone through a script, preferrably
  7982. >through an OSAX, but I'll take whatever I can get.
  7983. >
  7984. >        Baring a pre-made solution, does anyone know where I can get source
  7985. >code in C to such an application?  Peter Lewis's excellent app "Finger"
  7986. >unfortunately does not currently support scripting, and was written in
  7987. >Pascal so I can't even hack his code.  (I don't have a Pascal compiler)
  7988. >
  7989. >        Thanks,
  7990. >          Sam
  7991.  
  7992.  
  7993.  
  7994. Hi, contact Atul Butte. Following is the text of his TCP/IP Scripting
  7995. Addition OSAX beta test distribution.
  7996.  
  7997. -DM
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004. Subject: TCP/IP Scripting Addition
  8005.  
  8006. My Legal Department finally approved the distribution, so...
  8007.  
  8008. The next message you receive from me will be a 74 kilobyte BinHex encoded
  8009. self-enclosed archive (an application that you can open). Enclose in the
  8010. archive are the TCP/IP Scripting Addition (version 1.0b1), a first draft of
  8011. the instructions, and five sample scripts.  These are:
  8012.  
  8013. 1. Drag and Drop FTP  -- Drag files on it and it will FTP them to a host
  8014. 2. Finger  -- Tell it who and where to look for someone and it will Finger them
  8015. 3. Get Weather  -- What's the weather like in Washington DC? (via Gopher)
  8016. 4. Gopher Server  -- Makes text files available over Gopher
  8017. 5. Send Mail  -- Sends a simple mail message using SMTP
  8018.  
  8019. These sample scripts are described in a READ ME file (also enclosed in the
  8020. archive).
  8021.  
  8022. PLEASE NOTE:  This 1.0b1 version of the Scripting Addition EXPIRES on May
  8023. 1, 1994.  By then, you will have received a better version.  This is to
  8024. prevent people from continuing to use the older versions when newer ones
  8025. are available.
  8026.  
  8027. Please test the scripting addition on as many platforms as possible
  8028. (PowerBook, Power PC, A/UX, System 7.5, InterSLIP and MacSLIP).  Of course,
  8029. I would like to hear about any bugs you find, but I am also interested in
  8030. hearing how you are using these scripts and whether they work for you.  Let
  8031. me know if you would like to see additional commands in this suite.  I also
  8032. would like to get comments about the first-draft instructions.  I plan to
  8033. fix any bugs that you find and ideally release this scripting addition in
  8034. April.
  8035.  
  8036. If you come up with interesting scripts and you with to share them, please
  8037. post them on comp.sys.mac.programmer, comp.sys.mac.comm, or better yet on
  8038. the AppleScript mailing list.  I would love to see scripts combining
  8039. FileMaker and Gopher Server, or NetNews and MacWrite Pro, etc.  It is VERY
  8040. easy to use this scripting addition to facilitate ANY Internet
  8041. client-server interactions.
  8042.  
  8043. Many of you contacted me about using the scripting addition to help with
  8044. tasks in your company, as part of in-house products, as part of free
  8045. products, and as part of commercial products.  I am working on a licensing
  8046. plan that will start after the beta period is over.  If you have not
  8047. already, please let me know if you are interested in licensing the
  8048. scripting addition for one of these purposes.  For those of you who have
  8049. already, I will be sending you more information.
  8050.  
  8051. Thanks again for your interest!
  8052.  
  8053. -- Atul Butte
  8054.  
  8055. P.S. Please send mail to this address, as it will last longer than my NIH
  8056. address...
  8057.  
  8058. ----------------------------------------------------------------------
  8059. Atul Butte
  8060. atul_butte@brown.edu
  8061.  
  8062. currently at
  8063.    Howard Hughes Medical Institute / National Institutes of Health
  8064. atul_butte@nih.gov
  8065.  
  8066. Desmond K. Mullen - University of Minnesota, Office of Admissions
  8067. mulle009@maroon.tc.umn.edu - 612/625-0824
  8068. =========================================================================
  8069. Date:         Mon, 25 Apr 1994 15:36:24 -0400
  8070. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8071. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8072. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  8073. Subject:      Scripting InterSLIP???
  8074.  
  8075. I could have sworn that not too long ago I saw some messages on this list
  8076. regarding scripting InterSLIP.  However, I tried dragging every part of
  8077. InterSLIP (control panel, extension and DA) onto the script editor and none
  8078. have a dictionary.  Am I mistaken?  If not, how do I script it?
  8079.  
  8080. Also, on a related note, is there any way to have a "shutdown script"?
  8081. Something that gets run after a shutdown (actually, after all applications
  8082. excepting the Finder are quit from a shutdown).  I would like to make
  8083. simple script that automatically disconnects the InterSLIP connection after
  8084. a shutdown.
  8085.  
  8086. Are either of the commercial SLIP products (MacSLIP or VersaTerm SLIP)
  8087. scriptable or offer such a feature built in?
  8088.  
  8089. Steve
  8090.  
  8091. ---------------------
  8092.  jonke@gsfc.nasa.gov
  8093. ---------------------
  8094. =========================================================================
  8095. Date:         Mon, 25 Apr 1994 15:51:35 -0500
  8096. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8097. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8098. From:         Drew Phillips <drew@MAIL.COX.SMU.EDU>
  8099. Subject:      ScriptRunner
  8100.  
  8101. Has anyone used this at all.  It seems pretty steep for shareware ($66 I
  8102. think).  I was just curious if the full version was much better than the
  8103. demo version.
  8104.  
  8105. Thanks
  8106.  
  8107. DRew
  8108.  
  8109. ------------------------------------------------------------------------
  8110. Drew Phillips -- ISS           |  I'm going to be -- The Sledgehammer  |
  8111. Cox School of Business         |        This can be my testimony       |
  8112. Meadows School of the Arts     |          I'm your Sledgehammer        |
  8113. Southern Methodist University  |    Let there be no doubt about it     |
  8114. drew@mail.cox.smu.edu          |---------------------------------------|
  8115. =========================================================================
  8116. Date:         Mon, 25 Apr 1994 16:15:03 -0600
  8117. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8118. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8119. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  8120. Subject:      Re: Looking for Eudora scripts (re-post)
  8121.  
  8122. Eudora can display tabs as spaces, but apparently it sent my sorting script
  8123. with tabs intact, so it doesn't display very nicely in some folks's eemail
  8124. applications.
  8125.  
  8126. Here's the message again with a single space in place of each tab:
  8127.  
  8128. -DM
  8129.  
  8130.  
  8131.  
  8132.  
  8133. >Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  8134. >some intelligent things with my mail - eg if it's from a listServ address
  8135. >automatically file it in the appropriate mail-box.
  8136.  
  8137.  
  8138. Hello,
  8139.  
  8140. I just started using Eudora because of its scriptability. I love it!
  8141.  
  8142. Here is a quick script for sorting mail. I've edited it a bit for clarity
  8143. (and shortened some variable names so they'd fit in 80 columns!). This is a
  8144. rough script - it has not been refined and isn't necessarily very well
  8145. written, but it does its job very nicely. I use more if routines for sorting
  8146. the mail than you see here.
  8147.  
  8148. "Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
  8149. Besides communicating, I use it to notify me about a lot of things (I have
  8150. a folder-watching AppleScript that notifies me through Messenger). It is
  8151. scriptable (obviously!). It's free and available on Info-Mac's archives,
  8152. UMich and everywhere fine freeware is distributed!
  8153.  
  8154. -DM
  8155.  
  8156.  
  8157.  
  8158.  
  8159. on idle
  8160.  if "Eudora1.4.2" is in ((list applications) as string) then
  8161.   try
  8162.    tell application "Eudora1.4.2"
  8163.     with timeout of 1200 seconds
  8164.      set prevNoOfMsgs to number of message of mailbox "In" of mail folder ""
  8165.      connect
  8166.      set currNoOfMsgs to number of message of mailbox "In" of mail folder ""
  8167.      set theMessages to ""
  8168.      if prevNoOfMsgs =82 currNoOfMsgs then
  8169.       set alertMessenger to true
  8170.       set x to prevNoOfMsgs + 1
  8171.       repeat (currNoOfMsgs - prevNoOfMsgs) times
  8172.        set sndr to field "From" of message x of mailbox "In" of mail folder =
  8173. ""
  8174.        set recip to field "To" of message x of mailbox "In" of mail folder "=
  8175. "
  8176.        set sbjct to Subject of message x of mailbox "In" of mail folder ""
  8177.        set theMessages to theMessages & sndr & return & sbjct
  8178.        set x to x + 1
  8179.        if sndr contains "mulle" then
  8180.         set x to x - 1
  8181.         move message x of mailbox "In" of mail folder "" InsertHere end of
  8182. mailbox "MullNet" of mail folder ""
  8183.        end if
  8184.        if recip contains "MACSCRPT" then
  8185.         set x to x - 1
  8186.         move message x of mailbox "In" of mail folder "" InsertHere end of
  8187. mailbox "AppleScript" of mail folder ""
  8188.        end if
  8189.       end repeat
  8190.      else
  8191.       set alertMessenger to false
  8192.      end if
  8193.     end timeout
  8194.    end tell
  8195.  
  8196.    if alertMessenger is true then
  8197.     tell application "Messenger 1.5.9"
  8198.      copy "*:**New Mail**" to variable "theSender"
  8199.      copy return & theMessages & "**END**" to variable "theData"
  8200.      copy "Message" to variable "theDataType"
  8201.      do script "receiveTheEvent"
  8202.     end tell
  8203.    end if
  8204.   on error
  8205.   end try
  8206.  end if
  8207.  return 120 -- Idle time in seconds
  8208. end idle
  8209.  
  8210. Desmond K. Mullen - University of Minnesota, Office of Admissions
  8211. mulle009@maroon.tc.umn.edu - 612/625-0824
  8212. =========================================================================
  8213. Date:         Mon, 25 Apr 1994 14:18:39 -0700
  8214. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8215. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8216. From:         David Ray <daver@NETCOM.COM>
  8217. Subject:      Re: Scripting InterSLIP???
  8218.  
  8219. >I could have sworn that not too long ago I saw some messages on this list
  8220. >regarding scripting InterSLIP.  However, I tried dragging every part of
  8221. >InterSLIP (control panel, extension and DA) onto the script editor and none
  8222. >have a dictionary.  Am I mistaken?  If not, how do I script it?
  8223.  
  8224. Here is my "InterSLIP Autodialer" script. It requires the scriptable
  8225. app "InterSLIP AE" which is available on ftp.netcom.com/leonardr, as well
  8226. as the "AutoType" osax from gaea.
  8227.  
  8228. -Dave
  8229.  
  8230.  
  8231. global i
  8232. set i to 1
  8233. on idle
  8234.         if i = 1 then
  8235.                 tell application "Finder Liaison 1.1"
  8236.                         --note: you will have to add your own path below
  8237.                         Open (a reference to File "Mac:Comm:TCP
  8238. Tools:InterSLIP Setup")
  8239.                         quit
  8240.                 end tell
  8241.                 set i to i + 1
  8242.         else if i = 2 then
  8243.                 tell application "InterSLIP/AE"
  8244.                         set status to (Get Status ID)
  8245.                 end tell
  8246.                 if status = 0 then
  8247.                         AutoType "m" holding "control"
  8248.                 else if status = 4 then
  8249.                         set i to i + 1
  8250.                 end if
  8251.         else if i > 2 then
  8252.                 set i to i + 1
  8253.         end if
  8254.         if i = 5 then
  8255.                 --tell application "InterSLIP/AE" to quit
  8256.                 quit
  8257.         end if
  8258.         return 2
  8259. end idle
  8260.  
  8261. ------------------------------------------------------------------------------
  8262. David Ray                Dream Designs          Music Composition
  8263. daver@netcom.com         PO Box 5631            Interactive Multimedia
  8264. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  8265. =========================================================================
  8266. Date:         Tue, 26 Apr 1994 09:31:56 +0930
  8267. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8268. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8269. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  8270. Subject:      Coercing into a reference (dead & buried already?)
  8271.  
  8272. People,
  8273.  
  8274. Sorry if this occurs after the discussion is dead and buried, but we just
  8275. had a long weekend here in Australia (ANZAC Day), and I'm a little bit
  8276. behind.
  8277.  
  8278. On Fri, 22 Apr 1994 07:52:39 Roy Rapoport wrote :
  8279.  
  8280. >I've got an interesting problem:
  8281. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  8282. >to count the instances of each different answer in a field called 'product'.
  8283. >It's not *that* difficult, since there's only 14 different products (and it's
  8284. >not easy enough to be done through an FMPro script).
  8285.  
  8286. And he titled it "Coercing into a reference."  He went on to say that his
  8287. solution worked OK but that it was...
  8288.  
  8289. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  8290. >records/second.  I'd like to make it faster...
  8291. >
  8292. >Suggestions? Comments? Sneering remarks about newbies? :)
  8293.  
  8294. Well, I STILL classify myself as a "newby", so here goes...
  8295.  
  8296. I got AS 1.1 bundled with HyperCard 2.2, and LO! there is an example stack
  8297. called "Applescript Library" upon which I have based ALL my AS to date
  8298. using FileMakerPro.  In this stack are TWO examples of controlling FMPro,
  8299. one which simply returns all the field names in an FMPro database, and the
  8300. other which (and I quote) :
  8301.  
  8302. "This script builds a list of all unique values for a particular field, and
  8303. the number of records that have each value, for FileMaker Pro's active
  8304. database."
  8305.  
  8306. I have not timed the code, so it may be even more horrifically slow than
  8307. what you've already got, but it does work (at least from HC).
  8308.  
  8309. The *major* delays are still in the OS, as simple searches in FMPro are
  8310. almost instantaneous, yet via AS from HC can take 20 seconds or more!
  8311. Trying to improve the speed of your "counting" code probably won't help
  8312. much, as the bottleneck seems to occur in moving from record to record in
  8313. FMPro via AS.  For me to just move to the next record can take up to 5
  8314. seconds!  [I'm open to being shot down in flames if I've reported incorrect
  8315. stuff here, but I am still a beginner.]
  8316.  
  8317. Hope its not too late, and that this helps somewhat.
  8318.  
  8319. Best --
  8320.  
  8321.  
  8322. Paul J. Stoll
  8323. Computer Systems Officer
  8324. Computer Assisted Learning Unit
  8325. Flinders University of South Australia
  8326. Flinders Medical Centre
  8327. Bedford Park.  5042.
  8328. South Australia.
  8329.  
  8330. Ph. : (08) 204 4163
  8331. Fax : (08) 277 0085
  8332. =========================================================================
  8333. Date:         Tue, 26 Apr 1994 09:39:16 +0930
  8334. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8335. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8336. From:         Paul Baily <paulb@RANDOMSA.COM.AU>
  8337. Subject:      [Repost] deleting parts of a variable?
  8338.  
  8339. Hi folks,
  8340.  
  8341. [Apologies if this is the second time you've read this, the first time I
  8342. posted it, the only response I got was a deafening silence so I'm not even
  8343. sure the message got out.]
  8344.  
  8345. At the risk of asking an embarassingly easy question, how do I delete a
  8346. word or a text item from a variable within AppleScript (1.1)?
  8347.  
  8348. In HyperCard, what I'd do is something like:
  8349.  
  8350.    put "I don't eat snails.  I prefer fast food." into theVar
  8351. [...]
  8352.    delete word 7 of theVar
  8353.  
  8354. with the result of "I don't eat snails.  I prefer food."
  8355.  
  8356. ...but within AppleScript (using 'copy...to' instead of 'put...into' of
  8357. course) this produces this error:
  8358.  
  8359. word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  8360. delete message.
  8361.  
  8362. Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  8363. tried other alternatives like using text items, using 'set word 7 of theVar
  8364. to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  8365. driving me batty. Could some kind soul enlighten me so I can put the whole
  8366. experience behind me and get some sleep? :-)
  8367.  
  8368. Thanks in advance,
  8369.  
  8370. Paul.
  8371.  
  8372. --
  8373. _________________________________________________________________________
  8374. Paul Baily, Consulting SE       |                   paulb@randomsa.com.au
  8375.                                 |                    AppleLink:  AUST0370
  8376. ))/\ Random Access              |                   CompuServe: 73320,667
  8377.  \\\\Adelaide, South Australia  |Where we're going, we don't *need* roads
  8378. =========================================================================
  8379. Date:         Tue, 26 Apr 1994 08:33:23 CDT
  8380. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8381. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8382. From:         Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
  8383. Subject:      What Apps are running
  8384. In-Reply-To:  <9404260936.AA19714@ast1.spa.umn.edu>; from "Automatic digest
  8385.               processor" at Apr 26, 94 12:00 am
  8386.  
  8387. Can anyone tell me a method for determining what applications are running?
  8388. I need to close all apps before running a reset script I've written.
  8389.  
  8390. Any help would be appreciated.
  8391.  
  8392. -- Courtney Ann Nieman
  8393. -- Computer Instructor
  8394. -- Science Musuem of Minnesota
  8395. -- (612) 221-9462
  8396. -- havens@ast1.spa.umn.edu
  8397. =========================================================================
  8398. Date:         Tue, 26 Apr 1994 09:49:16 -0400
  8399. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8400. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8401. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  8402. Subject:      Test - Anyone have success turning off "acknowlegements" - 
  8403. NOACK??
  8404.  
  8405. Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
  8406. the list server and had it stick?  It keeps turning ACK back on for some
  8407. reason....
  8408.  
  8409. Steve
  8410.  
  8411. ---------------------
  8412.  jonke@gsfc.nasa.gov
  8413. ---------------------
  8414. =========================================================================
  8415. Date:         Tue, 26 Apr 1994 10:52:15 -0400
  8416. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8417. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8418. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  8419. Subject:      Re: Test - Anyone have success turning off "acknowlegements" -
  8420.               NOACK??
  8421. In-Reply-To:  <no.id> from "Stephen Jonke" at Apr 26, 94 09:49:16 am
  8422.  
  8423. --Stephen Jonke wrote:
  8424. >
  8425. >Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
  8426. >the list server and had it stick?  It keeps turning ACK back on for some
  8427. >reason....
  8428.  
  8429.     Well, it certainly doesn't do that for me. I have my options set to
  8430. MAIL, NOACK and REPRO just like I do for all of the listservs that I'm
  8431. on. Have you tried to unsubscribe, and the re-subscribe?
  8432.  
  8433. -Hades
  8434. =========================================================================
  8435. Date:         Tue, 26 Apr 1994 08:19:49 U
  8436. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8437. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8438. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  8439. Subject:      Getting Index
  8440.  
  8441. Getting Index
  8442. There's a way to get the list of different values in a FileMaker Pro database
  8443. (Edit, Paste Special, Paste from Index).  Does anyone know how to get that
  8444. index from FMPro with AppleScript?
  8445.  
  8446. -roy
  8447. =========================================================================
  8448. Date:         Tue, 26 Apr 1994 13:23:19 -0400
  8449. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8450. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8451. From:         John Schettino <js12@GTE.COM>
  8452. Subject:      Re: [Repost] deleting parts of a variable?
  8453.  
  8454. paulb@randomsa.com.au wrote:
  8455. >Hi folks,
  8456. >At the risk of asking an embarassingly easy question, how do I delete a
  8457. >word or a text item from a variable within AppleScript (1.1)?
  8458. >
  8459. >In HyperCard, what I'd do is something like:
  8460. >
  8461. >   put "I don't eat snails.  I prefer fast food." into theVar
  8462. >[...]
  8463. >   delete word 7 of theVar
  8464. >
  8465. >with the result of "I don't eat snails.  I prefer food."
  8466. >
  8467. >...but within AppleScript (using 'copy...to' instead of 'put...into' of
  8468. >course) this produces this error:
  8469. >
  8470. >word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  8471. >delete message.
  8472. >
  8473. >Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  8474. >tried other alternatives like using text items, using 'set word 7 of theVar
  8475. >to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  8476. >driving me batty. Could some kind soul enlighten me so I can put the whole
  8477. >experience behind me and get some sleep? :-)
  8478. >
  8479.  
  8480. Paul (and others)
  8481. repeat after me... AppleScript is not HyperTalk....
  8482.  
  8483. Alas, in the AS language guide, you will find that strings or text are
  8484. read-only objects. You cannot modify directly any string using anything
  8485. other than set or copy. For your example, you could do the following:
  8486.  
  8487. set theVar to "I don't eat snails.  I prefer fast food."
  8488.  
  8489. -- delete word 7
  8490. set theVar to text from word 1 to word 6 of theVar & " " & text from word 8
  8491. to word (number of words in theVar) of theVar
  8492.  
  8493. That's the best you can do with AS1.1.
  8494.  
  8495. - john
  8496.  
  8497. -----------------------------------------
  8498. js12@gte.com             GTE Laboratories
  8499. John Schettino                Waltham, MA
  8500. =========================================================================
  8501. Date:         Tue, 26 Apr 1994 14:38:00 -0400
  8502. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8503. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8504. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  8505. From:         ab026@FREENET.CARLETON.CA
  8506. Subject:      Re: Menu Events
  8507.  
  8508. Jeremy Quinn writes:
  8509.  
  8510. >I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  8511. >
  8512. >I am having some problems using the files in the archive.
  8513. >
  8514. >The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  8515. >aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  8516. >
  8517. >The (AppleScript) sample script will not pass the syntax check.
  8518. >
  8519. >I can't really work out how to use any of it.
  8520. >Has anyone got any sample scripts for Frontier?
  8521.  
  8522. Menu Events Scripting Addition does not implement an 'osax' handler.
  8523. It is only a dictionary ('aete').  The basic Apple Script Editor uses
  8524. any 'aete' resources it finds in the Scripting Additions folder to
  8525. syntax-check its scripts.  Not being a Frontier user, I can't comment
  8526. on how things would be different in that environment.
  8527.  
  8528. The actual code to support Menu events is a separate system extension,
  8529. so that it can work in the absence of any scripting system.
  8530.  
  8531. Ross Brown - AWOL Software Productions
  8532. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  8533. publisher of AWOL Utilities - "the best deal in freeware!"
  8534. ab026@freenet.carleton.ca
  8535. =========================================================================
  8536. Date:         Tue, 26 Apr 1994 13:25:45 -0700
  8537. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8538. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8539. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  8540. Subject:      Re: Menu Events
  8541.  
  8542. Jeremy Quinn sez...
  8543.  
  8544. >I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  8545. >
  8546. >I am having some problems using the files in the archive.
  8547. >
  8548. >The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  8549. >aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  8550. >
  8551. >The (AppleScript) sample script will not pass the syntax check.
  8552. >
  8553. >I can't really work out how to use any of it.
  8554. >Has anyone got any sample scripts for Frontier?
  8555.  
  8556. I hadn't cared about Menu Events, so I hadn't looked at it.  However, given
  8557. the explanation that Ross has provided, it would appear that:
  8558.  
  8559. 1.  Something (presumably a faceless background app) is likely running, and
  8560. has some System handlers installed to catch events (alternatively, it
  8561. accepts events directed to its process based on signature).
  8562.  
  8563. 2.  These events are described in the aete in "Menu Events Scripting Addition".
  8564.  
  8565. 3.  It is likely that the 'aete' parser which is part of the Commercial
  8566. Developers Suite (shipped with Frontier 3.x) can probably be induced to
  8567. write the glue needed to connect Frontier with the Menu Events extension
  8568. thing.  I would have to research how, but that would be the place to look.
  8569.  
  8570.    --John
  8571.  
  8572. --
  8573. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  8574. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  8575. =========================================================================
  8576. Date:         Tue, 26 Apr 1994 16:52:00 -0400
  8577. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8578. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8579. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  8580. From:         ab026@FREENET.CARLETON.CA
  8581. Subject:      Re: Menu Events
  8582.  
  8583. John W. Baxter writes:
  8584.  
  8585. >I hadn't cared about Menu Events, so I hadn't looked at it.  However, given
  8586. >the explanation that Ross has provided, it would appear that:
  8587. >
  8588. >1.  Something (presumably a faceless background app) is likely running, and
  8589. >has some System handlers installed to catch events (alternatively, it
  8590. >accepts events directed to its process based on signature).
  8591.  
  8592. The Menu Events system extension adds a system Apple event handler which
  8593. catches events sent to any high-level-event-aware application (unless that
  8594. application has bound an obnoxious total-wildcard handler over everything,
  8595. prime example being Microsoft Word).  There's no FBA involved.  It also
  8596. patches the menu selection trap to enable script recording of real menu
  8597. selections, but that's beside the point we're discussing.
  8598.  
  8599. >2.  These events are described in the aete in "Menu Events Scripting
  8600. Addition".
  8601.  
  8602. Yes.
  8603.  
  8604. >3.  It is likely that the 'aete' parser which is part of the Commercial
  8605. >Developers Suite (shipped with Frontier 3.x) can probably be induced to
  8606. >write the glue needed to connect Frontier with the Menu Events extension
  8607. >thing.  I would have to research how, but that would be the place to look.
  8608.  
  8609. Can't say, but I'm sure you can manage it, John!  :-)
  8610.  
  8611. Ross Brown - AWOL Software Productions
  8612. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  8613. publisher of AWOL Utilities - "the best deal in freeware!"
  8614. ab026@freenet.carleton.ca
  8615. =========================================================================
  8616. Date:         Wed, 27 Apr 1994 11:20:27 +1000
  8617. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8618. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8619. From:         Michael Bradshaw <mbradsh@EXTRO.UCC.SU.OZ.AU>
  8620. Subject:      AppleScript problem
  8621.  
  8622. I'm having a frustrating experience trying to use AppleScript to script
  8623. programs over a network, and I would appreciate any help.
  8624.  
  8625. The problem I'm getting is in simply trying to activate a remote
  8626. application.
  8627.  
  8628. Whenever I send an activate command to a valid file path and node name, I
  8629. get an error -919.  I've checked all settings and I'm sure everything
  8630. required is correct:  program linking is switched on in the remote
  8631. application, there is only one zone so no zone specifier is needed, both
  8632. sender and target machine are running AppleScript 1.1 under System 7.1.
  8633.  
  8634. A clue to the problem is in the result returned from the following script:
  8635.  
  8636. ------------------------------------------------------------------------
  8637. set applicationName to "Happy HD:Word Processing:Microsoft Word
  8638. 5.1a:Microsoft Word"  -- no word wrap in actual script
  8639. set machineName to "Library IIvx"
  8640.  
  8641. try
  8642.         activate application applicationName of machine machineName
  8643. on error errMsg number errNum from suspect
  8644.         display dialog errMsg & return & errNum buttons {"OK"}
  8645.         get suspect
  8646. end try
  8647. -----------------------------------------------------------------------
  8648.  
  8649. The Result:
  8650. application "Happy HD:Word Processing:Microsof
  8651. machine "Library IIvx"
  8652.  
  8653. Notice that the "Microsoft Word 5.1a" part has been slightly scrambled.
  8654. A similar thing happens with other applications, EG
  8655.  
  8656. The Result:
  8657. application "Happy HD:Data Management:Claris F
  8658. Pro" of machine "Library IIvx"
  8659.  
  8660. where "Claris Filemaker Pro" has become "Claris F=aker Pro"
  8661.  
  8662. The same error message occurs if the names are specified directly without
  8663. variables.  I have no idea why the application name has been scrambled and
  8664. the whole problem has me baffled.  I would greatly appreciate any assistance.
  8665.  
  8666. Michael Bradshaw
  8667. mbradsh@ucc.su.oz.au
  8668. =========================================================================
  8669. Date:         Wed, 27 Apr 1994 00:20:51 -0700
  8670. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8671. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8672. From:         Jon Pugh <jonpugh@NETCOM.COM>
  8673. Subject:      Re: AppleScript is not HyperTalk...
  8674.  
  8675. >repeat after me... AppleScript is not HyperTalk....
  8676.  
  8677. Good thing too.  HyperTalk has a different set of problems.  Like a really
  8678. lame compiler.  ;)_
  8679.  
  8680. >>...but within AppleScript (using 'copy...to' instead of 'put...into' of
  8681. >>course) this produces this error:
  8682.  
  8683. However, in deference to Hypercard, AppleScript 1.1 allows you to use
  8684. "put...into".  It just changes it to "copy...to" when you compile.
  8685.  
  8686. Jon
  8687.  
  8688. Sometimes you feel like a .sig, sometimes you don't.
  8689. =========================================================================
  8690. Date:         Wed, 27 Apr 1994 03:34:12 -0400
  8691. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8692. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8693. From:         Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
  8694. Subject:      AS interpreter?
  8695.  
  8696.         I wonder whether anyone is working on a command line interface for
  8697. the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  8698. difficult to do. I would enjoy being able to use my Mac remotely over a
  8699. vt100 emulation or worse. Besides, it would be fun to try editing text files
  8700. interactively using AppleScript commands. On the other hand, the command
  8701. interpreter would have to be sure to catch run-time errors whenever
  8702. possible.
  8703.         Since many users of this list know more about Mac programming than I do
  8704. (I've been hoping to sublimate my desire to learn real Mac programming by
  8705. AppleScripting) I'd like to ask them:
  8706.  
  8707. 1) I believe the Communications Toolbox can be used to provide terminal
  8708. I/O to a program whether the program is used locally or remotely.
  8709. Is that correct?
  8710.         If not, the discussion on the alt.mac.os list has confused me.
  8711. I was unable connect a session of Microphone LT to a session of a copy
  8712. of Microphone LT, but that doesn't prove anything. In a few minutes I'll
  8713. try Termy.
  8714.  
  8715. 2) A more iffy proposition:
  8716.    Supposing that one had an AppleScript-based command interpreter
  8717. responding to a connection through the CTB, could the interpreter
  8718. send the remote user through the usual AppleTalk log-in process?
  8719. Could the remote user be fit into the AppleTalk Users & Groups scheme?
  8720. =========================================================================
  8721. Date:         Wed, 27 Apr 1994 06:57:34 -0400
  8722. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8723. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8724. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  8725. Subject:      Re: AS interpreter?
  8726.  
  8727. At  3:34 AM 4/27/94 -0400, Aaron Mansheim wrote:
  8728. >        I wonder whether anyone is working on a command line interface for
  8729. >the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  8730. >difficult to do. I would enjoy being able to use my Mac remotely over a
  8731. >vt100 emulation or worse. Besides, it would be fun to try editing text files
  8732. >interactively using AppleScript commands. On the other hand, the command
  8733. >interpreter would have to be sure to catch run-time errors whenever
  8734. >possible.
  8735.  
  8736. Check out Script Daemon, by Peter Lewis, if you have MacTCP.  Script Daemon
  8737. allows you to telnet to your Mac and enter AppleScript commands.  Only the
  8738. owner can log in (using the Owner name&password).
  8739.  
  8740. Bob
  8741.  
  8742. --
  8743. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  8744. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  8745.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  8746. =========================================================================
  8747. Date:         Wed, 27 Apr 1994 08:17:06 -0500
  8748. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8749. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8750. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  8751. Subject:      Re: AS interpreter?
  8752.  
  8753. >        I wonder whether anyone is working on a command line interface for
  8754. >the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  8755. >difficult to do. I would enjoy being able to use my Mac remotely over a
  8756. >vt100 emulation or worse. Besides, it would be fun to try editing text files
  8757. >interactively using AppleScript commands. On the other hand, the command
  8758. >interpreter would have to be sure to catch run-time errors whenever
  8759. >possible.
  8760.  
  8761. Well, if you've got MacTCP, I believe what you ask has already been done by
  8762. Peter Lewis.  Grab yourself a copy of ScriptDaemon, and slap it into your
  8763. Startup Items folder.  With MacTCP installed, it allows you to telnet into
  8764. your Mac, login (based on users and groups), and enter applescript commands
  8765. at a command prompt (the applesoft prompt--I got a good chuckle at that).
  8766. Even multi-line commands (scripts) are supported.
  8767.  
  8768. King Rhoton                                             king@acpub.duke.edu
  8769. =========================================================================
  8770. Date:         Wed, 27 Apr 1994 08:25:53 -0400
  8771. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8772. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8773. From:         Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
  8774. Subject:      Eudora & HyperCard
  8775.  
  8776. Tom,
  8777.  
  8778. We've got a check made out to you in the amount of $300, all ready to send
  8779. when we finish this little project.  How's it coming?
  8780.  
  8781.  
  8782. *********************************************************************
  8783. Dr. Frank Lowney, Director, Regional Teacher Education Center
  8784.                   System Administrator, The GC EduNET Project
  8785. CBX 034, School of Education
  8786. Georgia College, Milledgeville, GA 31061-0490
  8787. Voice: (912) 453-5121
  8788. via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
  8789.         gcedunet.peachnet.edu
  8790. *********************************************************************
  8791. =========================================================================
  8792. Date:         Wed, 27 Apr 1994 12:54:27 GMT
  8793. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8794. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8795. From:         "Robert K. Terra" <Robert_Terra@BROWN.EDU>
  8796. Organization: Brown University
  8797. Subject:      Omitting a small list from a larger list
  8798.  
  8799. Hi All,
  8800.  
  8801. I have a list of folders, say 50 folders. I want to copy something to all
  8802. but 3 of those folders.  Is there any way, besides using nested "if-then's"
  8803. (in case 3 folders grows to 10 folders, I don't want to use 10 nested
  8804. if-then's) to accomplish this. I've tried using a variety(?) of "Repeat"
  8805. loops but can't get it the right way. What I want to do is:
  8806.  
  8807.  
  8808.                                                         for the first folder 
  8809. (of
  8810.  the 50)
  8811.                                compare it to all of the folders in the list of 
  8812. 3
  8813.  folders
  8814.                                              if they are equal (or contains, 
  8815. etc
  8816. ) then don't copy
  8817. something
  8818.                        to that folder
  8819.                  move on to the second folder (of the 50)
  8820.  
  8821. This works, but I'm having trouble inserting another repeat loop and still
  8822. only going through the 'big' list once:
  8823.  
  8824. set userVolume to "Admission.Users:"
  8825. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  8826.                      "Admission.Users:SUPLOAD"}
  8827. tell finderLib
  8828.         repeat with currentFolder in (listFiles at userVolume)
  8829.                 set allInfo to info for alias currentFolder
  8830.                 set isFolder to allInfo's folder
  8831.                 set isLocked to allInfo's locked
  8832.                 if currentFolder does not contain "DELETED.SAV" then
  8833.                         if currentFolder does not contain "RTERRA" then
  8834.                                 if currentFolder does not contain "SUPLOAD" 
  8835. then
  8836.                                         if isFolder and not isLocked then
  8837.                                                 ** DO SOMETHING HERE ** 
  8838. (copyFil
  8839. es, beep, whatever)
  8840.                                         end if
  8841.                                 end if
  8842.                         end if
  8843.                 end if
  8844.         end repeat
  8845. end tell
  8846.  
  8847.  
  8848. sorry for the length of post, hope I gave enough info. & it makes sense
  8849. PS: still using v. 1.0
  8850.  
  8851. Thx in advance for your help.
  8852. BobT
  8853. =========================================================================
  8854. Date:         Wed, 27 Apr 1994 06:36:00 PDT
  8855. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8856. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8857. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  8858. Subject:      Re: What Apps are running
  8859.  
  8860. >Date:    Tue, 26 Apr 1994 08:33:23 CDT
  8861. >From:    Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
  8862. >Subject: What Apps are running
  8863. >
  8864. >Can anyone tell me a method for determining what applications are running?
  8865. >I need to close all apps before running a reset script I've written.
  8866. >
  8867. >Any help would be appreciated.
  8868.  
  8869. Try using the list processes command in my Script Tools package.  I think
  8870. there is a similar command in the GTQ Scripting Library.
  8871.  
  8872. -Mark
  8873. =========================================================================
  8874. Date:         Wed, 27 Apr 1994 07:33:51 PDT
  8875. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8876. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8877. From:         Neil Rest <neilrest@ECOTONE.TOAD.COM>
  8878. Subject:      Re: AS interpreter?
  8879.  
  8880. Lack of a command line has been one of the Mac's most awful cripplings all
  8881.  along.
  8882. It is 99 44/100% superior to DOS -- but cannot batch file!!
  8883.         Neil
  8884. =========================================================================
  8885. Date:         Wed, 27 Apr 1994 23:26:34 +0800
  8886. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8887. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8888. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  8889. Subject:      Mail document to person as Eudora Attachment
  8890.  
  8891. --========================_17162796==_
  8892. Content-Type: text/plain; charset="macintosh"
  8893. Content-Transfer-Encoding: quoted-printable
  8894.  
  8895. The attached file is an applet that takes any file droped onto it and mails
  8896. it off to the person specified in the file.  I would change it to a bogus
  8897. email address as the default, except something seems to have happened to my
  8898. Applescript installation and I'm not entirely sure that modifying the one
  8899. that Quinn sent to me would be a good plan.
  8900.  
  8901. The applet has been sent to Steve Dorner for inclusion in the scripts
  8902. directory on ftp.qualcomm.com.
  8903.  
  8904. The applet is most likely public domain.  To Quote Quinn and Peter from the
  8905. comments "As far as we=D5re concerned you can do whatever you like with this
  8906. script."
  8907.  
  8908. Please look at this file and modify it before testing it out.  Peter
  8909. doesn't want your attachments!
  8910.  
  8911. Share and Enjoy,
  8912. Craig
  8913.  
  8914.  
  8915.  
  8916. --========================_17162796==_
  8917. Content-Type: application/mac-binhex40; name="Mail_To_Peter"
  8918. Content-Disposition: attachment; filename="Mail_To_Peter"
  8919.  
  8920. (This file must be converted with BinHex 4.0)
  8921.  
  8922.  
  8923.  
  8924. --========================_17162796==_
  8925. Content-Type: text/plain; charset="us-ascii"
  8926. Content-Transfer-Encoding: quoted-printable
  8927.  
  8928. --
  8929. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  8930. The University of Western Australia      or 380 3860 Email for FAX Number
  8931. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  8932. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  8933.  
  8934.  
  8935.  
  8936. --========================_17162796==_--
  8937. =========================================================================
  8938. Date:         Wed, 27 Apr 1994 12:05:11 -0400
  8939. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8940. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8941. From:         Laurent Daudelin <laurent@PLANON.QC.CA>
  8942. Subject:      Applet & Droplet
  8943.  
  8944. Hi all!
  8945.  
  8946. I just begun to take a look at AppleScript and have a question.
  8947.  
  8948. I'm using AppleScript 1.0, found in the AV Macs.
  8949.  
  8950. I tried to use a script already posted here, to automatically do
  8951. binhex translation of a file, using Stuffit Lite.
  8952.  
  8953. The script check syntax is ok.  The problem is I don't have the
  8954. choice to save it as a drop-in application, in Script Editor.  I
  8955. opened some drop-in applet, and when I want to save them, the option
  8956. for a droplet appears in the dialog, but not when I want to save my
  8957. script.  Is there anything I'm missing here?  I suppose yes....
  8958.  
  8959. On a related topic, what do you get when you buy the AppleScript
  8960. user-version from APDA?  Any doc?  Is there any electronic
  8961. documentation about the basics of AppleScript?  I've search the
  8962. latest bookmark CD, but found nothing.
  8963.  
  8964. Any help very appreciated!
  8965.  
  8966. Laurent.
  8967.  
  8968. ---
  8969. ******************************************************************
  8970. Laurent Daudelin, Software Engineer
  8971. Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
  8972. laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
  8973. =========================================================================
  8974. Date:         Wed, 27 Apr 1994 12:35:38 -0400
  8975. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8976. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8977. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  8978. Subject:      Re: Applet & Droplet
  8979. In-Reply-To:  <no.id> from "Laurent Daudelin" at Apr 27, 94 12:05:11 pm
  8980.  
  8981. --Laurent Daudelin wrote:
  8982. >
  8983. >I'm using AppleScript 1.0, found in the AV Macs.
  8984.  
  8985.     You should definitely upgrade to 1.1.
  8986.  
  8987. >I tried to use a script already posted here, to automatically do
  8988. >binhex translation of a file, using Stuffit Lite.
  8989. >
  8990. >The script check syntax is ok.  The problem is I don't have the
  8991. >choice to save it as a drop-in application, in Script Editor.  I
  8992. >opened some drop-in applet, and when I want to save them, the option
  8993. >for a droplet appears in the dialog, but not when I want to save my
  8994. >script.  Is there anything I'm missing here?  I suppose yes....
  8995.  
  8996.     What you are missing is an "on open" handler for your script. Your
  8997. script should look something like:
  8998.  
  8999.         on open theFiles
  9000.            [This is where you have the script commands for the binhex
  9001.             translator, theFiles is a list that contains the pathnames
  9002.             to the files dropped onto the droplet.]
  9003.         end open
  9004.  
  9005. >On a related topic, what do you get when you buy the AppleScript
  9006. >user-version from APDA?  Any doc?  Is there any electronic
  9007. >documentation about the basics of AppleScript?  I've search the
  9008. >latest bookmark CD, but found nothing.
  9009.  
  9010.     If all you really want is some good documentation, then I recommend
  9011. buying the AppleScript Language Guide (English Dialect), from
  9012. Addison-Wesley. It will run you about $29.95 from your favorite
  9013. bookstore. Or you could buy the Complete AppleScript Handbook by Danny
  9014. Goodman. Also around $30, but it also comes with an upgrade to AS 1.1,
  9015. for the cost of the disk and shipping I believe.
  9016.  
  9017. -Hades
  9018. =========================================================================
  9019. Date:         Wed, 27 Apr 1994 12:36:33 -0400
  9020. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9021. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9022. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  9023. Subject:      Re: AS interpreter?
  9024. In-Reply-To:  <no.id> from "Neil Rest" at Apr 27, 94 07:33:51 am
  9025.  
  9026. --Neil Rest wrote:
  9027. >
  9028. >Lack of a command line has been one of the Mac's most awful cripplings
  9029. >all along.  It is 99 44/100% superior to DOS -- but cannot batch file!!
  9030.  
  9031.     I seriously hope this is a joke.
  9032.  
  9033. -Hades
  9034. =========================================================================
  9035. Date:         Wed, 27 Apr 1994 09:46:56 PDT
  9036. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9037. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9038. From:         "David Rogers,Eng" <david.rogers@ALDUS.COM>
  9039. Organization: Aldus Corporation, Seattle, WA
  9040. Subject:      Re: AS interpreter?
  9041.  
  9042. I don't agree.  There are times when a command-line is nice to have.
  9043. Otherwise there would be no MPW.
  9044.  
  9045. Regards,
  9046. David
  9047. ---------------------------------------------------------------------------
  9048. david.rogers@aldus.com    -========)--  Frodo Lives
  9049. --(========-
  9050. ---------------------------------------------------------------------------
  9051. _______________________________________________________________________________
  9052. From: Macintosh Scripting Systems on Wed, Apr 27, 1994 9:46 AM
  9053. Subject: Re: AS interpreter?
  9054. To: David Rogers,Eng
  9055.  
  9056. --Neil Rest wrote:
  9057. >
  9058. >Lack of a command line has been one of the Mac's most awful cripplings
  9059. >all along.  It is 99 44/100% superior to DOS -- but cannot batch file!!
  9060.  
  9061.     I seriously hope this is a joke.
  9062.  
  9063. -Hades
  9064. =========================================================================
  9065. Date:         Wed, 27 Apr 1994 13:04:23 -0400
  9066. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9067. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9068. From:         John Schettino <js12@GTE.COM>
  9069. Subject:      Re: Omitting a small list from a larger list
  9070.  
  9071. >Hi All,
  9072. >
  9073. >This works, but I'm having trouble inserting another repeat loop and still
  9074. >only going through the 'big' list once:
  9075. >
  9076. >Thx in advance for your help.
  9077. >BobT
  9078.  
  9079. You were *SO* close, but it is simple (NOTE! May Only Work in AS 1.1)
  9080.  
  9081. set userVolume to "Admission.Users:"
  9082. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  9083.                      "Admission.Users:SUPLOAD"}
  9084. tell finderLib
  9085.         repeat with currentFolder in (listFiles at userVolume)
  9086.                 set allInfo to info for alias currentFolder
  9087.                 set isFolder to allInfo's folder
  9088.                 set isLocked to allInfo's locked
  9089.                 if noCopyList does not contain currentFolder  then
  9090.                                         if isFolder and not isLocked then
  9091.                                                 ** DO SOMETHING HERE **
  9092. (copyFiles, beep, whatever)
  9093.                                         end if
  9094.                 end if
  9095.         end repeat
  9096. end tell
  9097.  
  9098.  
  9099. Note that if statement!
  9100. In AS (1.1?) you can ask if a list (noCopyList) contains an element
  9101. (currentFolder)
  9102.  
  9103. Just try this code snippit, If you get true as the result, then it works in 1.0
  9104.  
  9105. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  9106. "Admission.Users:SUPLOAD"}
  9107.  
  9108. noCopyList contains "Admission.Users:DELETED.SAV"
  9109.  
  9110. - john
  9111.  
  9112. -----------------------------------------
  9113. js12@gte.com             GTE Laboratories
  9114. John Schettino                Waltham, MA
  9115. =========================================================================
  9116. Date:         Wed, 27 Apr 1994 10:10:32 -0700
  9117. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9118. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9119. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  9120. Subject:      Re: Applet & Droplet
  9121.  
  9122. >Hi all!
  9123. >
  9124. >I just begun to take a look at AppleScript and have a question.
  9125. >
  9126. >I'm using AppleScript 1.0, found in the AV Macs.
  9127.  
  9128. Version 1.1 of AppleScript fixes some problems with 1.0.  You might want to
  9129. purchase an upgrade.  You might want to wait, if you're not having
  9130. problems, for the "spring" release (now due in summer, 'tis said) of System
  9131. 7.5.
  9132.  
  9133.  
  9134. >I tried to use a script already posted here, to automatically do
  9135. >binhex translation of a file, using Stuffit Lite.
  9136. >
  9137. >The script check syntax is ok.  The problem is I don't have the
  9138. >choice to save it as a drop-in application, in Script Editor.  I
  9139. >opened some drop-in applet, and when I want to save them, the option
  9140. >for a droplet appears in the dialog, but not when I want to save my
  9141. >script.  Is there anything I'm missing here?  I suppose yes....
  9142.  
  9143. To be a droplet, a script requires a handler for the open message.  That
  9144. handler receives control when a file is dropped onto the droplet.  Check
  9145. out one of the example droplets for details.
  9146.  
  9147.  
  9148. >On a related topic, what do you get when you buy the AppleScript
  9149. >user-version from APDA?  Any doc?  Is there any electronic
  9150. >documentation about the basics of AppleScript?  I've search the
  9151. >latest bookmark CD, but found nothing.
  9152.  
  9153. The documentation does come with the purchased version...it is also
  9154. available in bookstores.  That should be true there in Quebec, as it is
  9155. here.
  9156.  
  9157. --John
  9158.  
  9159. --
  9160. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  9161. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  9162. =========================================================================
  9163. Date:         Wed, 27 Apr 1994 12:31:24 -0500
  9164. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9165. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9166. From:         Fred Terry <pfterry@LKS.CSI.COM>
  9167. Subject:      Re: AS interpreter?
  9168. In-Reply-To:  Your message of "Wed, 27 Apr 94 09:46:56 PDT"
  9169.  
  9170. David,
  9171.  
  9172. >I don't agree.  There are times when a command-line is nice to have.
  9173. >Otherwise there would be no MPW.
  9174. >
  9175.  
  9176. I have to agree with you. One of my favorite features in Frontier is the
  9177. Instant or Quick Script window....I just want it available no matter what
  9178. program I'm in. But then, maybe I've been spending too much time on
  9179. workstations. :-)
  9180.  
  9181. pf
  9182.  
  9183.  
  9184. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9185. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  9186. =========================================================================
  9187. Date:         Wed, 27 Apr 1994 14:14:58 -0400
  9188. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9189. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9190. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  9191. Subject:      Re: What Apps are running
  9192.  
  9193. > Can anyone tell me a method for determining what applications are
  9194. > running? I need to close all apps before running a reset script I've
  9195. > written.
  9196. >
  9197. > Any help would be appreciated.
  9198.  
  9199. the "list applications" osax from the GTQ programming suite should work fine.
  9200. GTQ is on gaea in applescript/osaxen, or i can email it if you need.
  9201.  
  9202. --
  9203. My opinions are mine only and tentative, pending further data
  9204.                         Matthew Ahrens
  9205. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  9206. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  9207. =========================================================================
  9208. Date:         Wed, 27 Apr 1994 14:22:20 -0400
  9209. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9210. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9211. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  9212. Subject:      Re: Menu Events
  9213.  
  9214. I'm not sure if this is what you were talking about, but I wrote a
  9215. script to be able to easier use Menu Events. Normally, you are supposed
  9216. to use ResEdit to paste the aete into the app you wish to control. i
  9217. don't know about you, but to me this is a pain in the butt. insted, just
  9218. paste this script at the bottom of the script you are writing, and call
  9219. it as follows:
  9220.  
  9221. to query a menu list, use
  9222. QueryMenuList(application <app name>)
  9223. and it will return the info. To query a menu, use
  9224. QueryMenu(application <app name>, menu id)
  9225. to do a menu item, use
  9226. DoMenuItem(application <app name>, Menu ID, Menu Item ID)
  9227.  
  9228. ps. i just posted a much improved version of this script to info-mac, so
  9229. it should show up soon. get it from there if you can't get this version
  9230. to work. the better version lets you do a menu by giving the subroutine
  9231. the name of the app, menu title, and menu item, and lots better error
  9232. handling.
  9233.  
  9234. ***attached script follows***
  9235.  
  9236. on QueryMenuList(apl)
  9237.   try
  9238.     tell apl
  9239.       return (<<event MAEnuqmn#>>)
  9240.       -- in the above line, the "MAEnuqmn#" should have "AE" as one character
  9241.     end tell
  9242.   on error (errID)
  9243.     return (errID as string)
  9244.   end try
  9245. end QueryMenuList
  9246.  
  9247. on QueryMenu(apl, MenuID)
  9248.   try
  9249.     tell apl
  9250.       return (<<event MAEnuqmn >> given <<class mnid>>:MenuID)
  9251.       -- in the above line, the "MAEnuqmn " should have "AE" as one character
  9252.     end tell
  9253.   on error (errID)
  9254.     return (errID as string)
  9255.   end try
  9256. end QueryMenu
  9257.  
  9258. on DoMenuItem(apl, MenuID, MenuItemID)
  9259.   try
  9260.     tell apl
  9261.       <<event MAEnusemi>> given <<class mnid>>:MenuID, <<class miid>>
  9262. :MenuItemID
  9263.       -- in the above line, the "MAEnusemi" should have "AE" as one character
  9264.     end tell
  9265.     return ""
  9266.   on error (errID)
  9267.     return (errID as string)
  9268.   end try
  9269. end DoMenuItem
  9270.  
  9271. --
  9272. My opinions are mine only and tentative, pending further data
  9273.                         Matthew Ahrens
  9274. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  9275. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  9276. =========================================================================
  9277. Date:         Wed, 27 Apr 1994 14:40:21 -0400
  9278. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9279. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9280. From:         Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
  9281. Subject:      AS interpreter
  9282.  
  9283. Sorry, I didn't mean to start a thread on the merits of Mac OS.
  9284. But since I did, here's my take :)  I think AppleScript supplies
  9285. batch processing perfectly well. It's just 1) not interactive the
  9286. way an interpreter is and 2) not directly useable for controlling a
  9287. Mac remotely via something less graphical. Presumably "most users"
  9288. don't care about these features, as it's much easier to use the
  9289. graphical interface.
  9290.         Now that I've installed ScriptDaemon, I'm enjoying the chance
  9291. to use the AppleScript I've learned as if using an interpreter. This
  9292. way I don't feel the need to sit down and try to write a complete
  9293. package for some purpose the way I do when using the Script Editor.
  9294. The ScriptDaemon prompt stares at me just as hard as an empty Script
  9295. Editor window, but ScriptDaemon only wants one command to be happy :)
  9296. On the other hand, pretty soon I'll want to create something to allow
  9297. me to keep a current path and change directory from it. Using "list
  9298. folder" with full pathnames all the time gets old.
  9299.         I don't think I'll be using ScriptDaemon remotely until I've
  9300. learned the file IO commands from Script Tools. Shouldn't be too hard.
  9301. My next thing to look for is a way to access dictionaries from a
  9302. script.
  9303.         Thanks to those who suggested ScriptDaemon and to Peter Lewis,
  9304. who seems to be very busy.
  9305. =========================================================================
  9306. Date:         Wed, 27 Apr 1994 12:09:22 U
  9307. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9308. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9309. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  9310. Subject:      Getting the FM Field Index
  9311.  
  9312. Getting the FM Field Index in AS
  9313.  
  9314. I'm trying to optimize a script by doing only searches for items that are
  9315. actually in a database.  Now, FM can easily (and very quickly) give me a list
  9316. of values in a field by giving me the index of that field (Edit, Paste
  9317. Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  9318. =========================================================================
  9319. Date:         Wed, 27 Apr 1994 15:24:15 EST
  9320. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9321. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9322. Comments:     Resent-From: David Avery <DAVID@DARTCMS1>
  9323. Comments:     Originally-From: sheaj@ohsu.edu (Jackson Shea,PC,Microbiology)
  9324. From:         David Avery <DAVID@DARTCMS1.BITNET>
  9325. Subject:      Re: AS interpreter?
  9326. In-Reply-To:  your message  of Wed Apr 27 12:31:24 -0500 1994
  9327.  
  9328. I don't know if anyone has mentioned it but there is a product calle CLImate
  9329. for the macintosh which provides dos/unix flavored commands for file
  9330. manipulation.
  9331.  
  9332. There is a review of it in MacWeek (7/26/93 with rebuttal by the company in
  9333. 9/6/93).
  9334.  
  9335. Pertinent info:
  9336. CLImate
  9337. Orchard Software Inc.
  9338. P.O. Box 380814
  9339. Cambridge, MA  02238-0814
  9340. (617) 876-4608
  9341. SRP: $59.95
  9342.  
  9343. Jackson Shea
  9344.  
  9345. ---------------------------------
  9346. Oregon Health Sciences University                  Voice:  (503)494-2444
  9347. Molecular Microbiology & Immunology                  Fax:  (503)494-6862
  9348. Mail Code L220                                      inet:  sheaj@ohsu.edu
  9349. Portland, Oregon  97201-3098   USA                    or   jshea@lclark.edu
  9350. =========================================================================
  9351. Date:         Wed, 27 Apr 1994 15:04:41 -0500
  9352. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9353. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9354. From:         hunt andrew n <andy@UX1.CSO.UIUC.EDU>
  9355. Subject:      Eudora send mail script
  9356. In-Reply-To:  <199404271938.AA27001@ux1.cso.uiuc.edu> from "David Rogers,
  9357.               Eng" at Apr 27, 94 09:46:42 am
  9358.  
  9359. I just tried out the recently posted Eudora script and have
  9360. a question about it.
  9361.  
  9362. When I try and use it (drag/drop and double click) I get
  9363. the error message "Could not run the Script "Mail to Peter
  9364. because the script's data format is too new for scripting
  9365. component to read it"
  9366.  
  9367. Does this mean that I need a newer version of Applescript?
  9368. I have version 1.0 of AppleScript and also v 1.0.1 of the Script Editor.
  9369. Both came with the Tao of Applescript book. Is there an update?
  9370.  
  9371. Thanks!
  9372.  
  9373.  
  9374. ah.
  9375.  
  9376. Andrew Hunt
  9377. Book Designer @ University of Illinois Press
  9378. a-hunt2@uiuc.edu
  9379. =========================================================================
  9380. Date:         Wed, 27 Apr 1994 17:01:04 -0600
  9381. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9382. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9383. From:         Mel Walker <mwalker@NETCOM.COM>
  9384. Subject:      Re: Mail document to person as Eudora Attachment
  9385.  
  9386. >--========================_17162796==_
  9387. >Content-Type: text/plain; charset="macintosh"
  9388. >Content-Transfer-Encoding: quoted-printable
  9389. >
  9390. >The attached file is an applet that takes any file droped onto it and mails
  9391. >it off to the person specified in the file.  I would change it to a bogus
  9392. >email address as the default, except something seems to have happened to my
  9393. >Applescript installation and I'm not entirely sure that modifying the one
  9394. >that Quinn sent to me would be a good plan.
  9395. >
  9396. >The applet has been sent to Steve Dorner for inclusion in the scripts
  9397. >directory on ftp.qualcomm.com.
  9398. >
  9399. >The applet is most likely public domain.  To Quote Quinn and Peter from the
  9400. >comments "As far as we=D5re concerned you can do whatever you like with this
  9401. >script."
  9402. >
  9403. >Please look at this file and modify it before testing it out.  Peter
  9404. >doesn't want your attachments!
  9405. >
  9406. >Share and Enjoy,
  9407. >Craig
  9408.  
  9409. Why didn't you write the script like so:
  9410.  
  9411. property recipient: "user@machine.com"
  9412. on open theFiles
  9413.         tell application "Eudora"
  9414.                 make message InsertHere end of mailbox "out" of mail folder ""
  9415.                 set field "to" of message 0 to recipient
  9416.                 set field "subject" of message 0 to "File Transfer"
  9417.                 attach message 0 DocumentList theFiles -- note change
  9418.                 queue message 0
  9419.         end tell
  9420. end open
  9421.  
  9422. instead of doing all that work to make the X-Attachments line as you did?
  9423.  
  9424. --Mel Walker
  9425.  
  9426. --
  9427. Mel Walker                                           mwalker@netcom.com
  9428. "Actually, I just like to say the word 'Smock.' Smock Smock Smock Smock
  9429. Smock Smock Smock!" - Hobbes
  9430. =========================================================================
  9431. Date:         Wed, 27 Apr 1994 23:37:15 -0400
  9432. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9433. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9434. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  9435. Subject:      parsing text in AppleScripts
  9436.  
  9437. Greetings to macscrpt readers ...
  9438.  
  9439. I have a question that doesn't appear to be addressed in the FAQ or
  9440. Tao of AppleScript.  It's fairly clear from the language description
  9441. that AS is not intended to be a text-parsing language, but I'd like
  9442. to find some basic string manipulation beyond that offered in the
  9443. String Commands osax that comes with AppleScript.  The only thing
  9444. I've found that comes close were some of the Rinaldi externals
  9445. in the XCMD osax package, but the functionality is not exactly
  9446. what I'm looking for.
  9447.  
  9448. Specifically, I'd like something that would let me manipulate
  9449. strings as in HyperCard -- for example:
  9450.  
  9451.  get char (offset "[" of str) to (offset "]" of str) of str
  9452.  
  9453. which would mimic the HyperTalk
  9454.  
  9455.  get char (offset("[",str)) to (offset("]",str)) of str
  9456.  
  9457. which returns "[text]", say, if str is "Some [text] here".
  9458.  
  9459. Assuming that such string-parsing tools are not available as
  9460. osaxen, would it be a good approach to create Xthings with
  9461. ThinkC or CompileIt, and add it to the XCMD osax, or is it
  9462. easier to write osaxen directly with Think C?
  9463.  
  9464. I'm aware that some of what I'd like to do might be doable
  9465. using the scriptable text parsing of a MacPerl, but launching
  9466. that is overkill for the current project, in which I'd like
  9467. to parse the result of "current date" to build a string like
  9468. "940427" to append to the name of a backup file.
  9469.  
  9470. Suggestions and pointers to books, FAQs, or ftp sites
  9471. gratefully accepted!
  9472.  
  9473. Bill
  9474.  
  9475. -- Bill Johnston (johnston@me.udel.edu)
  9476. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  9477. =========================================================================
  9478. Date:         Wed, 27 Apr 1994 21:05:21 U
  9479. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9480. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9481. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  9482. Subject:      Re: parsing text in AppleScr
  9483.  
  9484. Reply to:   RE>parsing text in AppleScript
  9485. Bill Johnston says:
  9486. >Specifically, I'd like something that would let me manipulate
  9487. >strings as in HyperCard -- for example:
  9488. > get char (offset "[" of str) to (offset "]" of str) of str
  9489.  
  9490. You mean something like,
  9491. set str to "just some text with [a string] in brackets"
  9492. set astring to (characters ((offset of "[" in str) + 1) thru ((offset of "]"
  9493. in str) - 1) of str) as text
  9494.  
  9495. ?
  9496. Works for me ...
  9497.  
  9498. -roy, wondering if anybody's got some Excel-related scripts I could take a
  9499. look at?
  9500. =========================================================================
  9501. Date:         Wed, 27 Apr 1994 22:43:22 -0700
  9502. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9503. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9504. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  9505. Subject:      Re: parsing text in AppleScripts
  9506.  
  9507. >Specifically, I'd like something that would let me manipulate
  9508. >strings as in HyperCard -- for example:
  9509. >
  9510. > get char (offset "[" of str) to (offset "]" of str) of str
  9511.  
  9512. Not what you want, but in Frontier's UserTalk, that would be simple:
  9513.  
  9514.    str1 =3D string.nthField (str, ']', 1)
  9515.    str1 =3D string.nthField (str1, '[', 2)
  9516.  
  9517. [The first line makes string 1 everything before the first ']'...the second
  9518. makes str1 everything after the first '['.  If you don't need the original
  9519. str, you can just store back into that, rather than using str1.  I'm too
  9520. lazy to figure out whether the HyperTalk includes the [ and ] or not...the
  9521. UserTalk doesn't but they could easily be added back, by changing the
  9522. second line to
  9523.  
  9524.    str1 =3D "[" + string.nthField (str1, '[', 2) + "]"
  9525.  
  9526.  
  9527. >Assuming that such string-parsing tools are not available as
  9528. >osaxen, would it be a good approach to create Xthings with
  9529. >ThinkC or CompileIt, and add it to the XCMD osax, or is it
  9530. >easier to write osaxen directly with Think C?
  9531.  
  9532. Unless you are very comfortable already writing XCMDs (or want an XCMD for
  9533. your HyperCard work, too), just write the osax directly.  osaxen are easy.
  9534.  
  9535. >I'm aware that some of what I'd like to do might be doable
  9536. >using the scriptable text parsing of a MacPerl, but launching
  9537. >that is overkill for the current project, in which I'd like
  9538. >to parse the result of "current date" to build a string like
  9539. >"940427" to append to the name of a backup file.
  9540.  
  9541. This snippet requires AppleScript 1.1 (so does sanity), and I sincerely
  9542. hope that there is a way to get the numeric month, rather than the
  9543. enumerated type as found below.  The following should be fine in other
  9544. languages, too.  It does produce a nice numeric string representing the
  9545. date:
  9546.  
  9547. set foo to current date
  9548. set yr to characters 3 through 4 of ((year of foo) as string) as string
  9549. set mo to (month of foo)
  9550. set da to (day of foo) as string
  9551. if (count of (da as string)) < 2 then set da to "0" & da
  9552. if mo =3D January then
  9553.         set mo to "01"
  9554. else if mo =3D February then
  9555.         set mo to "02"
  9556. else if mo =3D March then
  9557.         set mo to "03"
  9558. else if mo =3D April then
  9559.         set mo to "04"
  9560. else if mo =3D May then
  9561.         set mo to "05"
  9562. else if mo =3D June then
  9563.         set mo to "06"
  9564. else if mo =3D July then
  9565.         set mo to "07"
  9566. else if mo =3D August then
  9567.         set mo to "08"
  9568. else if mo =3D September then
  9569.         set mo to "09"
  9570. else if mo =3D October then
  9571.         set mo to "10"
  9572. else if mo =3D November then
  9573.         set mo to "11"
  9574. else
  9575.         set mo to "12"
  9576. end if
  9577. return yr & mo & da
  9578.  
  9579. (It's fine in French, apparently (gotten just by changing the dialect in
  9580. the preferences)):
  9581.  
  9582. mets foo =E0 date courante
  9583. mets yr =E0 chaque caract=E8re depuis 3 jusqu'=E0 4 de ((ann=E9e de foo) com=
  9584. me
  9585. cha=EEne) comme cha=EEne
  9586. mets mo =E0 (mois de foo)
  9587. mets da =E0 (jour de foo) comme cha=EEne
  9588. si (compte de (da comme cha=EEne)) < 2 alors mets da =E0 "0" & da
  9589. si mo =3D Janvier alors
  9590.         mets mo =E0 "01"
  9591. sinon si mo =3D F=E9vrier alors
  9592.         mets mo =E0 "02"
  9593. ...
  9594. sinon si mo =3D Novembre alors
  9595.         mets mo =E0 "11"
  9596. sinon
  9597.         mets mo =E0 "12"
  9598. fin si
  9599. renvoie yr & mo & da
  9600.  
  9601. [Eudora will use a quoted form for the French a` (to)...what your mail
  9602. reader will do with it I don't know...likewise the other accented
  9603. characters.]
  9604.  
  9605. --
  9606. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  9607. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  9608. =========================================================================
  9609. Date:         Wed, 27 Apr 1994 11:27:30 -0500
  9610. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9611. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9612. From:         QMGATE <QMGATE.INET@QMGATE.LARC.NASA.GOV>
  9613. Subject:      QM Server Problems - Please
  9614.  
  9615. Mail*Link(r) SMTP               Mail document to person as Eudora
  9616. See enclosed file of Mail To Peter
  9617.  
  9618.  
  9619.  
  9620. (This file must be converted with BinHex 4.0)
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.  
  9633.  
  9634.  
  9635.  
  9636.  
  9637.  
  9638.  
  9639.  
  9640.  
  9641.  
  9642.  
  9643.  
  9644.  
  9645.  
  9646.  
  9647.  
  9648.  
  9649.  
  9650.  
  9651.  
  9652.  
  9653.  
  9654.  
  9655.  
  9656.  
  9657.  
  9658.  
  9659.  
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.  
  9674.  
  9675.  
  9676.  
  9677.  
  9678.  
  9679.  
  9680.  
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.  
  9695.  
  9696.  
  9697.  
  9698.  
  9699.  
  9700.  
  9701.  
  9702.  
  9703.  
  9704.  
  9705.  
  9706.  
  9707.  
  9708.  
  9709.  
  9710.  
  9711.  
  9712.  
  9713.  
  9714.  
  9715.  
  9716.  
  9717.  
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723.  
  9724.  
  9725.  
  9726.  
  9727.  
  9728.  
  9729.  
  9730.  
  9731.  
  9732.  
  9733.  
  9734.  
  9735.  
  9736.  
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.  
  9745.  
  9746.  
  9747.  
  9748.  
  9749.  
  9750.  
  9751.  
  9752.  
  9753.  
  9754.  
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.  
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.  
  9773.  
  9774.  
  9775.  
  9776.  
  9777.  
  9778.  
  9779.  
  9780.  
  9781.  
  9782.  
  9783.  
  9784.  
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.  
  9792.  
  9793.  
  9794.  
  9795.  
  9796.  
  9797.  
  9798.  
  9799.  
  9800.  
  9801.  
  9802.  
  9803.  
  9804.  
  9805.  
  9806.  
  9807.  
  9808.  
  9809.  
  9810.  
  9811.  
  9812.  
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822. =========================================================================
  9823. Date:         Thu, 28 Apr 1994 08:40:05 -0600
  9824. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9825. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9826. From:         Tom Donovan <donovan@COVIS.NWU.EDU>
  9827. Subject:      Re: AS Interpreter
  9828.  
  9829. I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
  9830. when I happened upon a discussion of the HyperTalk "do" command and the
  9831. following example script:
  9832.  
  9833.         on mouseUp
  9834.                 ask "Please enter a line of AppleScript:"
  9835.                 if it is not empty then do it as AppleScript
  9836.         end mouseUp
  9837.  
  9838. It occurred to me that if one created a one-card stack with a field on it
  9839. to receive AS statements, one might be able to simulate a command-line
  9840. interface.  Granted, it would probably be painfully slow, but it's a start.
  9841.  
  9842. Just an idea...
  9843.  
  9844.  
  9845. --Tom
  9846.  
  9847. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9848. Tom Donovan           "Perhaps the most universal information trap is the...
  9849. System Administrator   trap of forgetting what it's like not to know. The
  9850. CoVis Project          minute we know something, we forget what it was like
  9851. Northwestern Univ.     not to know it."             --Richard S. Wurman
  9852.                                                       "Information Anxiety"
  9853. E-mail: donovan@covis.nwu.edu
  9854. (Check out the CoVis Web Server at URL: http://www.covis.nwu.edu/)
  9855. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9856. =========================================================================
  9857. Date:         Thu, 28 Apr 1994 14:55:05 GMT0BST
  9858. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9859. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9860. From:         "Alistair G. Lowe-Norris" <agl1@LEICESTER.AC.UK>
  9861. Subject:      Complete AppleScript Handbook - Out of Print
  9862.  
  9863. I have just tried to obtain a copy of this through my normal
  9864. University book-shop and have been told that it is now out-of-print.
  9865.  
  9866. I contacted MacLine (UK) and grabbed the last copy off of their
  9867. shelves - they did not know it was OOP.
  9868.  
  9869. Does anyone know whether it is OOP and if so when it is being printed
  9870. again.
  9871.  
  9872. Alistair.--
  9873. ---------------------------------------------------------------------------
  9874. | Alistair G. Lowe-Norris, Systems Programmer      E-mail : agl1@le.ac.uk |
  9875. | Computer Centre, Leicester University,                                  |
  9876. | University Road, Leicester LE1. 7RH., U.K.                              |
  9877. |                                                                         |
  9878. | UK       Tel: (0533) 522250     Fax: (0533) 525027                      |
  9879. | Non-UK   Tel: +44 (533) 522250  Fax: +44 (533) 525027                   |
  9880. ---------------------------------------------------------------------------
  9881. =========================================================================
  9882. Date:         Wed, 27 Apr 1994 21:16:15 PDT
  9883. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9884. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9885. From:         network_manager@ALDUS.COM
  9886. Organization: Aldus Corporation, Seattle, WA
  9887. Subject:      NDN:Re: parsing text in AppleScr
  9888.  
  9889. Your mail to the Microsoft Mail Server could not be fully
  9890. delivered!   No Valid Addresses!   It has been deleted.
  9891.  
  9892. Error List:
  9893.   Bad 'To:' Address: David Rogers,Eng@Sea12
  9894. =========================================================================
  9895. Date:         Thu, 28 Apr 1994 11:13:01 -0500
  9896. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9897. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9898. From:         Steve Alex <steve_alex@POSTOFFICE.AIDT.EDU>
  9899. Subject:      PowerShare Mail
  9900.  
  9901. We are in the midst of a painful process of moving to PowerShare Mail from
  9902. QuickMail. We've got QuickMail AOCE so that the users have a somewhat
  9903. familiar face, but there are a couple of missing features that are causing us
  9904. grief.
  9905.  
  9906. 1. There is no way of knowing whether a mail message has been read or not (or
  9907. return receipt), you just know that it had been sent to the PowerShare
  9908. server. We've tried to use mail as the primary means of sending
  9909. correspondence. If it is important, the users will check the mail log to see
  9910. if mail has been read in what they consider an adequate amount of time, if
  9911. not they may revert to ancient means of communication, such as the phone
  9912. system!
  9913.  
  9914. 2. Notification of new mail arriving does not happen unless the user
  9915. remembers to unlock their key chain.
  9916.  
  9917. 3. If PowerShare temporarily loses a service (network glitch, etc.) it
  9918. creates an alert condition that must be cleared before new mail is received,
  9919. but the user is not alerted about the problem unless they open their In Tray
  9920. (and see the alert icon and correct the problem).
  9921.  
  9922. 4. We've lost the QuickConference capability.
  9923.  
  9924. While most of these "missing features" are problems with PowerShare, I'm
  9925. looking for temporary fixes, possibly with AS.  I've been tempted to put a
  9926. FaceSpan (Frontmost) application that's kind of an administrator's aid (if
  9927. the FaceSpan memory leak is fixed) on everyone's machine. It could
  9928. periodically check if the key chain is unlocked (GTQ's "get user" will return
  9929. an error if keychain is unlocked). If I could figure out how get to the read
  9930. check mark, I might be able to respond to a "has message been read" request.
  9931. I could probably even implement a QuickConference hack.  But maybe someone
  9932. knows of a better way of dealing with these problems, possibly on the server.
  9933.  
  9934.  
  9935. +---------------------------------------+----------------------------------+
  9936. | --------------+ Steve Alex            | All ideas here are my own and    |
  9937. |   +---------- | Alabama Industrial    | in no way reflect my employer's. |
  9938. |   | ----------+ Development Training  |              steve_alex@aidt.edu |
  9939. |   +---------------------------------- |                                  |
  9940. +---------------------------------------+----------------------------------+
  9941. =========================================================================
  9942. Date:         Thu, 28 Apr 1994 09:19:41 -0700
  9943. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9944. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9945. From:         Steve Michel <michel@NETCOM.COM>
  9946. Subject:      Re: Getting the FM Field Index
  9947.  
  9948. >Getting the FM Field Index in AS
  9949. >
  9950. >I'm trying to optimize a script by doing only searches for items that are
  9951. >actually in a database.  Now, FM can easily (and very quickly) give me a list
  9952. >of values in a field by giving me the index of that field (Edit, Paste
  9953. >Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  9954.  
  9955. There's no way to get the index of a field directly, but here's a handler
  9956. that first gets all the entries in a field (across the entire database or
  9957. shown set, and then removes all the duplicates:
  9958.  
  9959. on getUniqueItems of fieldName given dataBase:theFile
  9960.         tell application "FileMaker Pro" -- get everything from the field
  9961.                 copy Field fieldName of Document theFile to theList
  9962.         end tell
  9963.         copy {} to unqiueItems -- to hold only uniqe values
  9964.         repeat with x in theList
  9965.                 if x is not in unqiueItems then
  9966.                         copy unqiueItems & x to unqiueItems
  9967.                 end if
  9968.         end repeat
  9969.         return unqiueItems
  9970. end getUniqueItems
  9971.  
  9972. call it with something like:
  9973.  
  9974. copy getUniqueItems of "model" given dataBase:"pict catalog" to myList
  9975.  
  9976. This is none too fast, especially with large databases, but it does work.
  9977.  
  9978. Steve
  9979. =========================================================================
  9980. Date:         Thu, 28 Apr 1994 12:36:50 -0400
  9981. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9982. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9983. From:         John Schettino <js12@GTE.COM>
  9984. Subject:      Re: Getting the FM Field Index
  9985.  
  9986. >>Getting the FM Field Index in AS
  9987. >>
  9988. >>I'm trying to optimize a script by doing only searches for items that are
  9989. >>actually in a database.  Now, FM can easily (and very quickly) give me a list
  9990. >>of values in a field by giving me the index of that field (Edit, Paste
  9991. >>Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  9992. >
  9993. >There's no way to get the index of a field directly, but here's a handler
  9994. >that first gets all the entries in a field (across the entire database or
  9995. >shown set, and then removes all the duplicates:
  9996. >
  9997. >on getUniqueItems of fieldName given dataBase:theFile
  9998. >        tell application "FileMaker Pro" -- get everything from the field
  9999. >                copy Field fieldName of Document theFile to theList
  10000. >        end tell
  10001. >        copy {} to unqiueItems -- to hold only uniqe values
  10002. >        repeat with x in theList
  10003. >                if x is not in unqiueItems then
  10004. >                        copy unqiueItems & x to unqiueItems
  10005. >                end if
  10006. >        end repeat
  10007. >        return unqiueItems
  10008. >end getUniqueItems
  10009.  
  10010. >This is none too fast, especially with large databases, but it does work.
  10011.  
  10012. If you have AS1.1, you can speed it up using the following:
  10013.  
  10014. on getUniqueItems of fieldName given dataBase:theFile
  10015.         tell application "FileMaker Pro" -- get everything from the field
  10016.                 copy Field fieldName of Document theFile to theList
  10017.         end tell
  10018.         set unqiueItems to {} -- to hold only uniqe values
  10019.         repeat with x in theList
  10020.                 if x is not in unqiueItems then
  10021.                         set end of unqiueItems to x
  10022.                 end if
  10023.         end repeat
  10024.         return unqiueItems
  10025. end getUniqueItems
  10026.  
  10027. A minor change, but it does eliminate quite a bit of time on all the list
  10028. copies.
  10029.  
  10030. - john
  10031.  
  10032. -----------------------------------------
  10033. js12@gte.com             GTE Laboratories
  10034. John Schettino                Waltham, MA
  10035. =========================================================================
  10036. Date:         Thu, 28 Apr 1994 09:45:50 U
  10037. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10038. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10039. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  10040. Subject:      Re: Getting the FM Field In
  10041.  
  10042. Reply to:   RE>>Getting the FM Field Ind
  10043. Say, a related question then:   How big can lists get in AS? In other words,
  10044. can AS handle a list that will be 16,000 items long? If not, can I just
  10045. increase the memory allocation for the application created, and if so, to
  10046. what?
  10047.  
  10048. -roy
  10049. =========================================================================
  10050. Date:         Thu, 28 Apr 1994 12:01:17 -0600
  10051. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10052. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10053. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  10054. Subject:      Re: AS Interpreter
  10055.  
  10056. Or you can just type stuff into a field in HyperCard and execute it at the
  10057. press of return or enter or whatever you choose.
  10058.  
  10059. My Messenger application has that AS feature. Messenger is for one-to-one
  10060. chatting over AppleTalk LANs, but you can also type AppleScript commands
  10061. and select "Do AppleScript Commands" from the AS menu.
  10062.  
  10063. Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
  10064. application, and is available at sumex-aim, umich and all their mirrors.
  10065.  
  10066. -DM
  10067.  
  10068.  
  10069. >I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
  10070. >when I happened upon a discussion of the HyperTalk "do" command and the
  10071. >following example script:
  10072. >
  10073. >        on mouseUp
  10074. >                ask "Please enter a line of AppleScript:"
  10075. >                if it is not empty then do it as AppleScript
  10076. >        end mouseUp
  10077. >
  10078. >It occurred to me that if one created a one-card stack with a field on it
  10079. >to receive AS statements, one might be able to simulate a command-line
  10080. >interface.  Granted, it would probably be painfully slow, but it's a start.
  10081. >
  10082. >Just an idea...
  10083. >
  10084. >
  10085. >--Tom
  10086.  
  10087. Desmond K. Mullen - University of Minnesota, Office of Admissions
  10088. mulle009@maroon.tc.umn.edu - 612/625-0824
  10089. =========================================================================
  10090. Date:         Thu, 28 Apr 1994 14:16:20 -0500
  10091. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10092. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10093. From:         Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
  10094. Subject:      Dialog Box
  10095.  
  10096. Simple question follows.  Given a dialog box that comes up with some text
  10097. highlighted and buttons to choose, cancel connect, how do I tell it to
  10098. choose a specific button?  Thanks.
  10099.  
  10100.                                                 LEO
  10101.  
  10102. ------------------------------------------------------------------------
  10103. Michael Leo                         |    University Of Pennsylvania
  10104. mleo@eniac.seas.upenn.edu           |      School Of Engineering
  10105. mleo@wkstas.section.upenn.edu       |  Computer Science & Engineering
  10106.                                     |      maybe Management also
  10107. finger @kin648.resnet.upenn.edu     |
  10108. talk @kin648.resnet.upenn.edu       |
  10109. -------------------------------------------------------------------------
  10110. =========================================================================
  10111. Date:         Thu, 28 Apr 1994 14:20:18 EST
  10112. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10113. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10114. From:         Sam McLane <Sam_McLane@COMPSERV.OCIS.TEMPLE.EDU>
  10115. Subject:      Re: Dialog Box
  10116.  
  10117. Simple question follows.  Given a dialog box that comes up with some text
  10118. highlighted and buttons to choose, cancel connect, how do I tell it to
  10119. choose a specific button?  Thanks.
  10120.  
  10121.                                                 LEO
  10122.  
  10123. I guess by it you mean the script, as in a default button?
  10124.  
  10125. Try this
  10126.  
  10127. display dialog "Hello world"  Buttons {"OK","Cancel","foo"}
  10128.     default button "Ok"
  10129.  
  10130. -Sam McLane
  10131. sam@astro.ocis.temple.edu
  10132. =========================================================================
  10133. Date:         Thu, 28 Apr 1994 14:41:04 -0500
  10134. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10135. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10136. From:         Allan Marcus <allan_marcus@LANL.GOV>
  10137. Subject:      Boot time OASX???
  10138.  
  10139. Anyone know of a script or OASX thast can tell me the time the user booted
  10140. the MAc?  (that's boot-up, not kicked!)
  10141.  
  10142. Thanks,
  10143.  
  10144. Allan
  10145.  
  10146. ---------------------------------------
  10147. Allan Marcus
  10148. Los Alamos National Laboratory
  10149. "My opinions are my own, I think..."
  10150.  
  10151. Voice: 505-665-1828
  10152. CIS: 76666,2113
  10153. AppleLink: Allan.Marcus
  10154. e-world/NewtonMail: Allan.M
  10155. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  10156. ---------------------------------------
  10157. =========================================================================
  10158. Date:         Thu, 28 Apr 1994 15:31:53 -0400
  10159. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10160. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10161. From:         "George R. Brown" <gbrown@PARTECH.COM>
  10162. Subject:      Re: Dialog Box
  10163.  
  10164. At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
  10165. >Simple question follows.  Given a dialog box that comes up with some text
  10166. >highlighted and buttons to choose, cancel connect, how do I tell it to
  10167. >choose a specific button?  Thanks.
  10168. >
  10169. >                                                LEO
  10170. >
  10171. >I guess by it you mean the script, as in a default button?
  10172. >
  10173. >Try this
  10174. >
  10175. >display dialog "Hello world"  Buttons {"OK","Cancel","foo"}
  10176. >    default button "Ok"
  10177. >
  10178. Along the same lines, is there a way to put up an ask box (similar to
  10179. HyperCard's ask command), fill it with a default, and determine which
  10180. button was selected (in case Cancel was selected)?
  10181.  
  10182.  - gb (george@partech.com)
  10183. =========================================================================
  10184. Date:         Thu, 28 Apr 1994 14:49:37 -0700
  10185. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10186. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10187. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  10188. Subject:      Re: Dialog Box
  10189.  
  10190. >At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
  10191.  
  10192. >Along the same lines, is there a way to put up an ask box (similar to
  10193. >HyperCard's ask command), fill it with a default, and determine which
  10194. >button was selected (in case Cancel was selected)?
  10195.  
  10196. The display dialog command is a Scripting Addition.  As such, it has an
  10197. AppleScript Dictionary, which you can easily open.  [In AppleScript 1.1,
  10198. the open file dialog for the Dictionary includes a button which takes you
  10199. directly to the Scripting Additions folder (even when you are already there
  10200. <sigh!>).]
  10201.  
  10202. Here's the Dictionary entry:
  10203.  
  10204. display dialog: Display a dialog.
  10205.     display dialog  anything  -- title of dialog
  10206.         [default answer  anything]  -- default editable text
  10207.         [buttons  list]  -- list of up to three buttons
  10208.         [default button  anything]  -- name or number of default button
  10209.         [with icon  anything]  -- name or id of the icon to display
  10210.         [with icon  stop/note/caution]  -- display one of these system icons
  10211.     Result:   reply  -- record containing the button hit and text entered
  10212. (if any)
  10213.  
  10214.  
  10215. So, yes, you can do what you ask (the reply can be looked at to see which
  10216. button was hit, and what the user typed if the Cancel button wasn't hit).
  10217. Experiment.
  10218.  
  10219.    --John
  10220.  
  10221. --
  10222. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  10223. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  10224. =========================================================================
  10225. Date:         Thu, 28 Apr 1994 13:40:16 -0800
  10226. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10227. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10228. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  10229. Subject:      Re: Boot time OASX???
  10230.  
  10231. >Anyone know of a script or OASX thast can tell me the time the user booted
  10232. >the MAc?  (that's boot-up, not kicked!)
  10233.  
  10234. How about an applet that launches at startup (sitting in the startup
  10235. folder), writes a time stamp to the end of a text file, maybe culls out
  10236. some of the old entries or keeps a maximum number of paragraphs in the text
  10237. file and then closes the text file and quits. Then you could open the text
  10238. file and read it.
  10239.  
  10240. Just an idea.
  10241.  
  10242. Kee Nethery
  10243.  
  10244. _________________________________________________________________
  10245. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  10246. =========================================================================
  10247. Date:         Thu, 28 Apr 1994 19:51:26 EDT
  10248. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10249. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10250. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  10251. Subject:      MS: MIME Headers
  10252.  
  10253. Words from the LISTSERV Gods regarding the troubles some of you have had
  10254. regarding MIME headers being lost:
  10255.  
  10256. Eudora users who submit postings to MACSCRPT should send the command
  10257.    SET FULLHRD ON
  10258. to listserv.  This will cause their subsequent postings to retain the
  10259. Mime header line.
  10260.  
  10261. This accounts for why some postings looked correct --- those from users
  10262. who had set the header status to full.
  10263.  
  10264. -A
  10265. =========================================================================
  10266. Date:         Thu, 28 Apr 1994 19:26:15 -0600
  10267. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10268. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10269. From:         Brian Caldwell <caldwell@WELL.SF.CA.US>
  10270. Subject:      APDA AppleScript Info
  10271.  
  10272. Just got my new APDA catalog (April 1994) and I thought I would share the
  10273. following info. From page 11 thereof:
  10274.  
  10275. (begin quote)
  10276. AppleScript Software Development Toolkit v. 1.1
  10277. Apple Computer, Inc.
  10278.  
  10279. Whether you're a commercial developer, in-house programmer, consultant, or
  10280. system integrator, building AppleScript support into your applications will
  10281. help you address the increasing demand to integrate off-the-shelf software
  10282. into custom solutions.
  10283.  
  10284. With AppleScript, you can compile scripts or create standalone applications
  10285. that let people perform complex operations by just clicking a mouse button.
  10286.  
  10287. This Software Development Kit includes the AppleScript language, system
  10288. software extension, and script editor; the FaceSpan Interface Processor
  10289. from Software Designs Unlimited Inc.; Data Access Language scripting
  10290. addition, development tools, sample code, and electronic documentation. It
  10291. also includes Finder scripting software that lets you control standard
  10292. Finder operations.
  10293.  
  10294. Licensing Note: Commercial developer redistribution licenses for
  10295. AppleScript system software are available through Apple Software Licensing
  10296. at (408) 974-4667.
  10297.  
  10298. System Requirements: A 68000 Macintosh computer or greater with 4 MB of
  10299. RAM, System 7 or later, and a CD-ROM drive.
  10300.  
  10301. Product Contents: Four Macintosh disks and one CD-ROM disc; three manuals:
  10302. The AppleScript Language Guide (English Dialect), Getting Started with
  10303. AppleScript, AppleScript Guide to Scriptable Applications; and a solution
  10304. developer's redistribution license for AppleScript system software and
  10305. FaceSpan runtime code.
  10306.  
  10307. AppleScript Software Development Toolkit v. 1.1
  10308. R0175Z/B.....$199.00
  10309.  
  10310. AppleScript Software Development Toolkit v. 1.0 to v. 1.1 upgrade
  10311. R0557Z/A......$99.00
  10312.  
  10313. (end quote)
  10314.  
  10315. And from page 10, the following may also be of interest:
  10316.  
  10317. (begin quote)
  10318. Apple Events/AppleScript Programming Tutorial
  10319. Apple Computer, Inc.
  10320.  
  10321. The Apple Events/AppleScript Programming Tutorial is the fastest way to get
  10322. ready for Apple event and AppleScript programming. This self-paced disk and
  10323. workbook tutorial teaches you the basics of Apple's new scripting
  10324. architecture. Using core modules from Developer University's classroom
  10325. course, this mini-course will teach you how to make your applications
  10326. script-ready and recordable. It will also prepare you to take advantage of
  10327. AppleScript software.
  10328.  
  10329. System Requirements: A macintosh Plus or later, with 4 MB or RAM and System
  10330. 7 or later.
  10331.  
  10332. Product Contents: One Macintosh disk and one workbook.
  10333.  
  10334. Apple Events/AppleScript Programming Tutorial
  10335. R0224LL/A....$150.00
  10336.  
  10337. (end quote)
  10338.  
  10339. Ordering info for APDA is:
  10340. Phone: U.S.       (800) 282-2732
  10341.        Canada     (800) 637-0029
  10342.        Int'nat'l. (716) 871-6555
  10343. Fax: (716) 871-6511
  10344. Hours: M-F 700am-500pm PT
  10345.  
  10346.   Applelink: APDA
  10347.   CompuServe: 76666,2405
  10348.   Internet: APDA@applelink.apple.com
  10349.   America Online: APDAorder
  10350.  
  10351.   APDA
  10352.   Apple Computer, Inc.
  10353.   P.O. Box 319
  10354.   Buffalo, NY 14207-0319
  10355.   USA
  10356.  
  10357. Payment Methods:
  10358.   MasterCard, VISA, American Express, US Checks, postal money orders
  10359.  
  10360. NOTE: The above information is provided entirely as a net.service. I assume
  10361. no liability for your actions. I have no connection with Apple Computer,
  10362. Inc. or APDA. Trademarked names and service marks are property of their
  10363. respective companies where found above.
  10364.  
  10365. Peace,
  10366. Brian
  10367.  
  10368. ------
  10369. --=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
  10370. caldwell@netcom.com
  10371. caldwell@well.sf.ca.us                                     bcaldwell@aol.com
  10372. PGP 2.3 key available via public key servers or direct email
  10373. ----------------------------------------------------------------------------
  10374. "The future is not set. There is no fate but what you make."
  10375. - John Conner, "The Terminator", "Terminator 2"
  10376. --=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
  10377. =========================================================================
  10378. Date:         Thu, 28 Apr 1994 18:02:04 U
  10379. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10380. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10381. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  10382. Subject:      Exporting Records
  10383.  
  10384. Exporting Records
  10385. Anyone know of a way for AppleScript to tell FileMaker Pro to export found
  10386. records into a file?
  10387.  
  10388. (going both to the Macscript listserv group and the FMPro listserv group)
  10389.  
  10390. -roy
  10391. =========================================================================
  10392. Date:         Fri, 29 Apr 1994 09:19:58 +0800
  10393. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10394. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10395. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  10396. Subject:      Re: AS Interpreter
  10397.  
  10398. Peter Lewis and I were having intermitant problems of Script Daemon
  10399. refusing connection when supplied with a valid name and password.
  10400.  
  10401. A solution that seems to work is to give Script Daemon more memory.  There
  10402. are probably all sorts of bizarre fluctuating memory requirements when you
  10403. start dealing with Applescript in your programs.
  10404.  
  10405. Share and Enjoy,
  10406. Craig
  10407.  
  10408. --
  10409. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  10410. The University of Western Australia      or 380 3860 Email for FAX Number
  10411. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  10412. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  10413. =========================================================================
  10414. Date:         Thu, 28 Apr 1994 19:00:49 U
  10415. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10416. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10417. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  10418. Subject:      Scope
  10419.  
  10420. Scope
  10421. I'm experiencing a problem due to my ignorance regarding scope in AppleScript
  10422. scripts.
  10423. To give a simple example, look at this script:
  10424.  
  10425. --
  10426. set thelist to {"foo", "bar"}
  10427. on open (listoffiles)
  10428.         global thelist
  10429.         doit()
  10430. end open
  10431.  
  10432. on doit()
  10433.         global thelist
  10434.         display dialog (item 1 of thelist)
  10435. end doit
  10436. --
  10437. Now, this returns 'thelist is not defined' when run.  However, if I were to
  10438. do
  10439. --
  10440. set thelist to { "foo", "bar"}
  10441. doit()
  10442. on doit()
  10443. global thelist
  10444. display dialog (item 1 of thelist)
  10445. end doit
  10446. --
  10447.  
  10448. This works fine, and I get 'foo'.
  10449.  
  10450. Now, clearly, I'm missing something about the scope of thelist here.  I need
  10451. to find a way to tell doit() what thelist is, and while I did originally
  10452. figure I could just define thelist inside the 'on open' subroutine and give
  10453. it to all the subroutines, this seems rather wasteful and does seem to cause
  10454. some slowing ...
  10455.  
  10456. Any advice? Comments? Condescending sniggering?
  10457.  
  10458. -roy
  10459. =========================================================================
  10460. Date:         Fri, 29 Apr 1994 12:48:17 +0930
  10461. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10462. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10463. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  10464. Subject:      Re : Boot time OSAX
  10465.  
  10466. >Anyone know of a script or OASX thast can tell me the time the user booted
  10467. >the MAc?  (that's boot-up, not kicked!)
  10468.  
  10469. How about the program "StarupLog v1.0", placed in your Startup Items,
  10470. writes the boot date & time to a Log file (text) which you can read/edit at
  10471. any time.
  10472. Just a suggestion.
  10473.  
  10474. Paul J. Stoll
  10475. Computer Systems Officer
  10476. Computer Assisted Learning Unit
  10477. Flinders University of South Australia
  10478. Flinders Medical Centre
  10479. Bedford Park.  5042.
  10480. South Australia.
  10481.  
  10482. Ph. : (08) 204 4163
  10483. Fax : (08) 277 0085
  10484. =========================================================================
  10485. Date:         Thu, 28 Apr 1994 22:50:48 -0700
  10486. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10487. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10488. From:         Scott Trotter <strotter@NETCOM.COM>
  10489. Subject:      Re: Boot time OASX???
  10490.  
  10491. >>Anyone know of a script or OASX thast can tell me the time the user booted
  10492. >>the MAc?  (that's boot-up, not kicked!)
  10493. >
  10494. >How about an applet that launches at startup (sitting in the startup
  10495. >folder), writes a time stamp to the end of a text file, maybe culls out
  10496. >some of the old entries or keeps a maximum number of paragraphs in the text
  10497. >file and then closes the text file and quits. Then you could open the text
  10498. >file and read it.
  10499.  
  10500. There's an even simpler, but very unreliable, way of doing this: Some INITs
  10501. and/or their preference files are modified at startup time. Pick one that
  10502. isn't modified at any time *other* than at startup, then use the standard
  10503. "Info for" OSAX to get it's modification date and time.
  10504.  
  10505. This method is completely non-transportable, guaranteed to eventually
  10506. break, bad enginering, a total kludge, etc, etc, but it'll work in a pinch.
  10507.  
  10508. --
  10509. ======================================================================
  10510. Scott Trotter          Desktop Strategies       Beaverton, Oregon, USA
  10511. email: strotter@netcom.com    fax: 503.641.2983    voice: 503.641.3741
  10512. =========================================================================
  10513. Date:         Thu, 28 Apr 1994 23:35:42 -0800
  10514. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10515. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10516. From:         Jon Pugh <jonpugh@NETCOM.COM>
  10517. Subject:      Re: Boot time osax
  10518.  
  10519. >Anyone know of a script or OASX thast can tell me the time the user booted
  10520. >the MAc?  (that's boot-up, not kicked!)
  10521.  
  10522. Jon's Commands 1.1 has a command "the ticks" which is the number of ticks
  10523. since the Mac was booted last. You can use that to calculate the time of
  10524. last boot with something like so:
  10525.  
  10526. set t to (the ticks) / 60
  10527. (current date) - t as date
  10528.  
  10529. This will probably have problems on a PowerBook which has been asleep since
  10530. its last boot.
  10531.  
  10532. Jon
  10533. =========================================================================
  10534. Date:         Thu, 28 Apr 1994 23:35:48 -0800
  10535. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10536. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10537. From:         Jon Pugh <jonpugh@NETCOM.COM>
  10538. Subject:      Re: Dialog box
  10539.  
  10540. >Simple question follows.  Given a dialog box that comes up with some text
  10541. >highlighted and buttons to choose, cancel connect, how do I tell it to
  10542. >choose a specific button?  Thanks.
  10543.  
  10544. I think he's asking how to drive a nonscriptable dialog (probably one which
  10545. does SLIP or PPP ;).
  10546.  
  10547. Too bad I don't have an answer.  :(
  10548.  
  10549. Jon
  10550. =========================================================================
  10551. Date:         Thu, 28 Apr 1994 23:35:54 -0800
  10552. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10553. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10554. From:         Jon Pugh <jonpugh@NETCOM.COM>
  10555. Subject:      Re: Scope
  10556.  
  10557. >Any advice? Comments? Condescending sniggering?
  10558.  
  10559. Scope?  Is my breath that bad?
  10560.  
  10561. >To give a simple example, look at this script:
  10562. >
  10563. >set thelist to {"foo", "bar"}
  10564. >on open (listoffiles)
  10565. >        global thelist
  10566. >        doit()
  10567. >end open
  10568. >
  10569. >on doit()
  10570. >        global thelist
  10571. >        display dialog (item 1 of thelist)
  10572. >end doit
  10573.  
  10574. Put "on run" around the first line and I think it will be more clear.  Any
  10575. statements outside a handler are implicitly in a run handler and only
  10576. executed if you press the run button or run the script some other way (i.e.
  10577. double clicking it when saved as an app or chosen from OSA Menu).
  10578.  
  10579. >Now, this returns 'thelist is not defined' when run.  However, if I were to
  10580. >do
  10581. >--
  10582. >set thelist to { "foo", "bar"}
  10583. >doit()
  10584. >on doit()
  10585. >global thelist
  10586. >display dialog (item 1 of thelist)
  10587. >end doit
  10588. >--
  10589. >
  10590. >This works fine, and I get 'foo'.
  10591. >
  10592. >Now, clearly, I'm missing something about the scope of thelist here.  I need
  10593. >to find a way to tell doit() what thelist is, and while I did originally
  10594. >figure I could just define thelist inside the 'on open' subroutine and give
  10595. >it to all the subroutines, this seems rather wasteful and does seem to cause
  10596. >some slowing ...
  10597.  
  10598. The proper thing to do is use a property.  Instead of your set command, use:
  10599.  
  10600. prop theList : {"foo", "bar"}
  10601.  
  10602. This will initialize theList at compile time, make it available to all
  10603. handlers within the script, and save the value of theList if you change it.
  10604.  
  10605. Cool, huh?
  10606.  
  10607. Jon
  10608. =========================================================================
  10609. Date:         Thu, 28 Apr 1994 23:44:21 -0800
  10610. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10611. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10612. From:         Jon Pugh <jonpugh@NETCOM.COM>
  10613. Subject:      Re: Dialog Box
  10614.  
  10615. >>Simple question follows.  Given a dialog box that comes up with some text
  10616. >>highlighted and buttons to choose, cancel connect, how do I tell it to
  10617. >>choose a specific button?  Thanks.
  10618.  
  10619. >I think he's asking how to drive a nonscriptable dialog (probably one which
  10620. >does SLIP or PPP ;).
  10621.  
  10622. >Too bad I don't have an answer.  :(
  10623.  
  10624. D'oh!
  10625.  
  10626. As soon as I mailed that I realized that the answer I know of is QuicKeys
  10627. 3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  10628. your QK script which pushes the buttons from the Script Editor and call
  10629. that from your more complete and functional script.
  10630.  
  10631. It's getting late.  ;)
  10632.  
  10633. Jon
  10634. =========================================================================
  10635. Date:         Fri, 29 Apr 1994 09:57:21 -0400
  10636. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10637. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10638. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  10639. Subject:      Re: MS: MIME Headers
  10640.  
  10641. >Eudora users who submit postings to MACSCRPT should send the command
  10642. >   SET FULLHRD ON
  10643.  
  10644. Well, I like Eudora, but not THAT much!!!  ;)
  10645.  
  10646. I believe Andy meant:
  10647.  
  10648. SET FULLHDR ON
  10649.         ^^^
  10650.  
  10651. Steve
  10652.  
  10653. ---------------------
  10654.  jonke@gsfc.nasa.gov
  10655. ---------------------
  10656. =========================================================================
  10657. Date:         Fri, 29 Apr 1994 06:59:55 -0700
  10658. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10659. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10660. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  10661. Subject:      Problem--AppleScript in HyperCard
  10662.  
  10663. Here's a cautionary tale.  In this case it doesn't matter, as is indicated
  10664. by the fact that the name of the stack is "JWB Play".
  10665.  
  10666. Given a HyperCard 2.2 script (in some object), written in the AppleScript
  10667. language.  In a handler, we find:
  10668.  
  10669.     tell application "UserLand Frontier "
  10670.         ....
  10671.     end tell
  10672.  
  10673.  
  10674. But, recently, I stopped running "UserLand Frontier ", in favor of
  10675. "UserLand Frontier  PowerPC".
  10676.  
  10677. Today, I tried to open that script (to find one I was looking for).  So
  10678. AppleScript's scripting component asked me 'Where is "UserLand Frontier "?
  10679. Since it wasn't around, I had to cancel.  At which point HyperCard
  10680. complained that it couldn't open the script.
  10681.  
  10682. So I can't edit the script to change Frontier's name.  [I'll either change
  10683. Frontier's name long enough to open the script, change Frontier's name
  10684. permanently, or play around setting the button's script property (which
  10685. will be the least efficient possible fix).
  10686.  
  10687. It's an interesting situation (and suggests that HyperCard is lax about
  10688. keeping script context information, or something...AppleScript Script
  10689. Editor isn't bothered by such a change...if it can't find the app by name
  10690. it looks for it by signature, and changes the text of the script
  10691. accordingly).
  10692.  
  10693.    --John
  10694.  
  10695. --
  10696. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  10697. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  10698. =========================================================================
  10699. Date:         Fri, 29 Apr 1994 09:05:57 -0500
  10700. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10701. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10702. From:         Fred Terry <pfterry@LKS.CSI.COM>
  10703. Subject:      Re: MS: MIME Headers
  10704. In-Reply-To:  Your message of "Fri, 29 Apr 94 09:57:21 EDT"
  10705.  
  10706. >>Eudora users who submit postings to MACSCRPT should send the command
  10707. >>   SET FULLHRD ON
  10708. >
  10709. >Well, I like Eudora, but not THAT much!!!  ;)
  10710. >
  10711. >I believe Andy meant:
  10712. >
  10713. >SET FULLHDR ON
  10714. >        ^^^
  10715.  
  10716. I got
  10717.  
  10718. SET MACSCRPT FULL
  10719.     ^^^^^^^^
  10720. to work a little better. :-)
  10721.  
  10722. pf
  10723. =========================================================================
  10724. Date:         Fri, 29 Apr 1994 11:43:17 -0500
  10725. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10726. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10727. From:         Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
  10728. Subject:      Re: Dialog Box
  10729.  
  10730. >>>Simple question follows.  Given a dialog box that comes up with some text
  10731. >>>highlighted and buttons to choose, cancel connect, how do I tell it to
  10732. >>>choose a specific button?  Thanks.
  10733. >
  10734. >>I think he's asking how to drive a nonscriptable dialog (probably one which
  10735. >>does SLIP or PPP ;).
  10736. >
  10737. >>Too bad I don't have an answer.  :(
  10738. >
  10739. >D'oh!
  10740. >
  10741. >As soon as I mailed that I realized that the answer I know of is QuicKeys
  10742. >3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  10743. >your QK script which pushes the buttons from the Script Editor and call
  10744. >that from your more complete and functional script.
  10745. >
  10746. >It's getting late.  ;)
  10747. >
  10748. >Jon
  10749.  
  10750.  
  10751. Thanks that is what I had intended in the way of the dialog box, but I
  10752. don't have Quick Keys yet, so I just used the Autotype addition to call a
  10753. return.
  10754.  
  10755.  LEO
  10756. =========================================================================
  10757. Date:         Fri, 29 Apr 1994 13:15:05 -0400
  10758. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10759. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10760. From:         Chris Brannon <cbrannon+@PITT.EDU>
  10761. Subject:      Cheapest way to get AS 1.1
  10762.  
  10763. I've seen several comments regarding upgrades to AS 1.1, so I figured I'd
  10764. repost this information, which I picked up from the list a while back.
  10765.  
  10766. You can order the 1.1 update to Danny Goodman's Complete AppleScript
  10767. Handbook for $4.75 (no shipping).  It includes AS 1.1, the latest script
  10768. editor, the Frontmost runtime extension and some help files.
  10769.  
  10770. As far as I can tell, it doesn't matter if you actually own the book (they
  10771. certainly didn't ask when I upgraded).
  10772.  
  10773. You can get in touch with Random House at 800-733-3000 (or 212-572-6045).
  10774. The ISBN number is 0-679-75537-3.
  10775.  
  10776.  
  10777.  
  10778. Regards,...Chris
  10779. +--------------------------------------------------------------------------
  10780. Christopher B. Brannon                             University of Pittsburgh
  10781. cbrannon+@pitt.edu        THE*TRUTH*IS*OUT*THERE          Political Science
  10782. =========================================================================
  10783. Date:         Fri, 29 Apr 1994 16:01:35 -0400
  10784. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10785. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10786. From:         "George R. Brown" <gbrown@PARTECH.COM>
  10787. Subject:      Applescript substring problem
  10788.  
  10789. I'm having a problem with the following script.  Look at the ***'d lines:
  10790.  
  10791. tell application "Eudora1.4.2"
  10792.         set theAddressee to ""
  10793.         set theAddressor to "george"
  10794.         set theSubject to "Attached documents..."
  10795.         tell application "Scriptable Text Editor"
  10796.                 set prefFile to open file =AC
  10797.                         "System Folder:Preferences:Send Attach Preferences"
  10798.                 repeat with i from 1 to count of lines of file prefFile
  10799.                         set str to (line i of file prefFile) as string
  10800.                         if str contains "From:" then
  10801.                                 set theAddressor to word 2 of str
  10802.                         else if str contains "Subject:" then
  10803.                                 --******************************************=
  10804. *
  10805.                                 --set x to (offset of ": " in str as string)=
  10806. +2
  10807.                                 --          ^^^^^^ returns compile error:
  10808.                                 --                 can't get ":" in str.
  10809.                                 --                 Access not allowed
  10810.                                 --******************************************=
  10811. *
  10812.                                 set theSubject to (characters (1) =AC
  10813.                                    thru (number of characters in str) of
  10814. str) as string
  10815.                         else if str contains "To:" then
  10816.                                 set theAddressee to word 2 of str
  10817.                         end if
  10818.                 end repeat
  10819.         end tell
  10820.         if theAddressee is empty then
  10821.                 set theResult to display dialog "Send to:" default answer =
  10822. =AC
  10823.                         "" buttons {"OK", "Cancel"} default button "OK"
  10824.                 set theButton to the button returned of theResult
  10825.                 set theAddressee to the text returned of theResult
  10826.         else
  10827.                 set theButton to "OK"
  10828.         end if
  10829.         if theButton is not "Cancel" then
  10830.                 set theMessage to make InsertHere end of mailbox "Out" of
  10831. mail folder "" ObjectClass message
  10832.                 set mbID to number of message of mailbox "Out" of mail=
  10833.  folder ""
  10834.                 tell theMessage
  10835.                         set toWhom to theAddressee
  10836.                         set field "Subject" to theSubject
  10837.                         set field "From" to theAddressor
  10838.                         set field "To" to theAddressee
  10839.                         --set field "X-Attachments" to docList
  10840.                         --set field "" to "Attachments: " & docList
  10841.                 end tell
  10842.                 queue theMessage QueueType 0
  10843.         end if
  10844. end tell
  10845.  
  10846.  - gb (george@partech.com)
  10847. =========================================================================
  10848. Date:         Fri, 29 Apr 1994 16:09:08 EDT
  10849. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10850. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10851. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  10852. Subject:      MS: MIME II
  10853.  
  10854. Another note from the powers that be. Sorry for the confusion.
  10855.  
  10856. -A
  10857.  
  10858. -------
  10859.  
  10860. >Shouldn't the fix for MIME headers indicate the list?
  10861.  
  10862. Ooops.  Your right, the FULLHDR option is on a list-by-list basis, not
  10863. server wide, so the right syntax is indeed:
  10864.    SET MACSCRPT FULLHDR
  10865.  
  10866. Sorry.
  10867. =========================================================================
  10868. Date:         Fri, 29 Apr 1994 16:38:41 -0400
  10869. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10870. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10871. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  10872. Subject:      App to run script at shutdown?
  10873.  
  10874. Does anyone know of an application that lets you create a "shutdown
  10875. script"?  A script that runs when you restart or shutdown your Mac?
  10876.  
  10877. Steve
  10878.  
  10879. ---------------------
  10880.  jonke@gsfc.nasa.gov
  10881. ---------------------
  10882. =========================================================================
  10883. Date:         Fri, 29 Apr 1994 16:41:31 -0400
  10884. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10885. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10886. From:         "George R. Brown" <gbrown@PARTECH.COM>
  10887. Subject:      Debugging applescripts
  10888.  
  10889. Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  10890. similarities between AppleScript and HyperCard but there certainly isn't
  10891. the debugger that HyperCard has (unless I'm missing something).  Can you
  10892. display the value of variables, set break-points, etc?
  10893.  
  10894.  - gb (george@partech.com)
  10895. =========================================================================
  10896. Date:         Fri, 29 Apr 1994 16:48:44 -0400
  10897. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10898. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10899. From:         Laurent Daudelin <laurent@PLANON.QC.CA>
  10900. Subject:      Applet & Droplet [REPOST]
  10901.  
  10902. Hi all!
  10903.  
  10904. Sorry to repost, I miss any answer because I was temporarely removed from the
  10905. list :-(
  10906.  
  10907. So, here it goes again:
  10908.  
  10909. I just begun to take a look at AppleScript and have a question.
  10910.  
  10911. I'm using AppleScript 1.0, found in the AV Macs.
  10912.  
  10913. I tried to use a script already posted here, to automatically do binhex
  10914. translation of a file, using Stuffit Lite.
  10915.  
  10916. The script check syntax is ok.  The problem is I don't have the choice to save
  10917. it as a drop-in application, in Script Editor.  I opened some drop-in applet,
  10918. and when I want to save them, the option for a droplet appears in the dialog,
  10919. but not when I want to save my script.  Is there anything I'm missing here?  I
  10920. suppose yes....
  10921.  
  10922. On a related topic, what do you get when you buy the AppleScript user-version
  10923. from APDA?  Any doc?  Is there any electronic documentation about the basics
  10924. of AppleScript?  I've search the latest bookmark CD, but found nothing.
  10925.  
  10926. Any help very appreciated!
  10927.  
  10928. Laurent.
  10929.  
  10930. ---
  10931. ******************************************************************
  10932. Laurent Daudelin, Software Engineer
  10933. Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
  10934. laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
  10935. =========================================================================
  10936. Date:         Fri, 29 Apr 1994 15:57:08 -0500
  10937. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10938. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10939. From:         Fred Terry <pfterry@LKS.CSI.COM>
  10940. Subject:      Re: Debugging applescripts
  10941. In-Reply-To:  Your message of "Fri, 29 Apr 94 16:41:31 EDT"
  10942.  
  10943. George,
  10944.  
  10945. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  10946. >similarities between AppleScript and HyperCard but there certainly isn't
  10947. >the debugger that HyperCard has (unless I'm missing something).  Can you
  10948. >display the value of variables, set break-points, etc?
  10949.  
  10950. No, not within the Script Editor. However, you can display variables in dialog
  10951. boxes using the display dialog scripting addition and you can sprinkle beeps
  10952. through your scripts to get "audio traces." If you have access to the
  10953. AppleScript beta CD, there was a scripting addition on it called Show
  10954. Variables which would display a modal window with variables in it.
  10955.  
  10956. On the up side of things, Mark Alldritt is working on a Script Debugger that
  10957. looks pretty good, and Main Event Software is also preparing a
  10958. beginner/developer environment called Scripter. Both programs will make
  10959. scripting easier.
  10960.  
  10961. pf
  10962.  
  10963.  
  10964. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  10965. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  10966. =========================================================================
  10967. Date:         Fri, 29 Apr 1994 16:54:00 -0400
  10968. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10969. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10970. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  10971. From:         ab026@FREENET.CARLETON.CA
  10972. Subject:      Re: Menu Events
  10973.  
  10974. Matthew Ahrens writes:
  10975.  
  10976. >I'm not sure if this is what you were talking about, but I wrote a
  10977. >script to be able to easier use Menu Events. Normally, you are supposed
  10978. >to use ResEdit to paste the aete into the app you wish to control. i
  10979. >don't know about you, but to me this is a pain in the butt.
  10980.  
  10981. Yeah, it *was* a pain until I added a proper scripting addition file in
  10982. version 1.1.1.  Version 1.1.2 is now current; you can get it from
  10983.   ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  10984.  
  10985. The package includes a sample script.  No more ResEdit.
  10986.  
  10987. Ross Brown - AWOL Software Productions
  10988. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  10989. publisher of AWOL Utilities - "the best deal in freeware!"
  10990. ab026@freenet.carleton.ca
  10991. =========================================================================
  10992. Date:         Fri, 29 Apr 1994 13:58:12 -0800
  10993. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10994. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10995. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  10996. Subject:      Re: Debugging applescripts
  10997.  
  10998. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  10999. >similarities between AppleScript and HyperCard but there certainly isn't
  11000. >the debugger that HyperCard has (unless I'm missing something).  Can you
  11001. >display the value of variables, set break-points, etc?
  11002. >
  11003. > - gb (george@partech.com)
  11004.  
  11005. I agree, the debugging tools for AppleScript are just not there yet.
  11006.  
  11007. I use statements such as:
  11008.  
  11009. display dialog "marker #1"
  11010.  
  11011. to step through the code to see which statement is failing.
  11012.  
  11013. I have found that the Apple Script Editor gives much better error messages
  11014. than does FaceSpawn or FrontMost or whatever they call it. I am developing
  11015. in FaceSpawn so that I have some user interface.
  11016.  
  11017. The most difficult part I have is in figuring out how the data in a
  11018. variable looks so that I can parse it and do something with it to give it
  11019. to the next statement.
  11020.  
  11021. Good luck, remember, HyperCard initially didn't have debuggers and variable
  11022. watchers either.
  11023.  
  11024. Kee nethery
  11025. =========================================================================
  11026. Date:         Fri, 29 Apr 1994 16:46:45 -0400
  11027. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11028. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11029. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  11030. Subject:      Can a script-applet run in background?
  11031.  
  11032. I have written a short script that mounts an AFPServer, copies
  11033. the contents of the mounted folder/volume to another disk, then
  11034. deletes the copied files.  The copy and delete are done using
  11035. the appropriate osaxen from Jon's commands.
  11036.  
  11037. My problem:  I'd like this to happen in the background for the
  11038. machine running the script, but I can't bring another app
  11039. (already open) to the foreground once I start the script.
  11040. If I change the script so as to activate the Finder some
  11041. time during execution, I can switch apps, but then the script
  11042. sits in the background apparently doing nothing until it dies
  11043. with an "Apple event timed out" error message.  Is this normal,
  11044. or have I messed up somewhere?  It's 7.0.1* on a IIx running
  11045. AS 1.1.
  11046.  
  11047. Here's the script, in case anyone is interested in the
  11048. server-related stuff:
  11049.  
  11050. try
  11051.   list nodes
  11052.   if (the result contains "wdjUs Macintosh:AFPServer@*") is false then
  11053.     display dialog "Please turn on FileSharing on wdj's Mac!" buttons
  11054.     {"OK"} default button "OK" with icon stop
  11055.   else
  11056.     list disks
  11057.     if (the result contains "Downloads") is false then
  11058.       MountVolume Zone "*" Server "wdjUs Macintosh" Volume "Downloads"
  11059.     end if
  11060.     set inputFolderPath to "Downloads:"
  11061.     set fileList to list folder inputFolderPath
  11062.     set destFolder to "HD0:Downloads:"
  11063.     set destFolderContents to list folder destFolder
  11064.     set skippedFiles to "" as string
  11065.     repeat with index from 1 to the number of items in fileList
  11066.       set theFile to item index of fileList
  11067.       if destFolderContents contains theFile then
  11068.         -- skip it, and warn user
  11069.         beep
  11070.         set skippedFiles to (skippedFiles & theFile & return)
  11071.       else
  11072.         set inputFilePath to inputFolderPath & theFile
  11073.         copyFile inputFilePath to destFolder without replacing
  11074.         deleteFile inputFilePath
  11075.       end if
  11076.     end repeat
  11077.     if skippedFiles is not "" then
  11078.       display dialog ("Won't clobber " & return & skippedFiles) buttons
  11079.       {"OK"} default button "OK"
  11080.     end if
  11081.   end if
  11082. on error errorText
  11083.   beep
  11084.   display dialog errorText buttons {"OK"} default button "OK" with icon stop
  11085. end try
  11086.  
  11087. -- Bill Johnston (johnston@me.udel.edu)
  11088. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  11089. =========================================================================
  11090. Date:         Fri, 29 Apr 1994 17:11:18 -0400
  11091. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11092. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11093. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  11094. Subject:      Re: App to run script at shutdown?
  11095. In-Reply-To:  <9404292043.AA15583@me.udel.edu>
  11096.  
  11097. Not an app, but how about the Shutdown FX init?
  11098.  
  11099. Bill
  11100.  
  11101. -- Bill Johnston (johnston@me.udel.edu)
  11102. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  11103. =========================================================================
  11104. Date:         Fri, 29 Apr 1994 16:13:00 -0500
  11105. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11106. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11107. From:         Fred Terry <pfterry@LKS.CSI.COM>
  11108. Subject:      Re: Applet & Droplet [REPOST]
  11109. In-Reply-To:  Your message of "Fri, 29 Apr 94 16:48:44 EDT"
  11110.  
  11111. Everyone,
  11112.  
  11113. >Sorry to repost, I miss any answer because I was temporarely removed from the
  11114. >list :-(
  11115. >
  11116.  
  11117. [Sorry, Laurent, I'm not near my Mac and can't remember the response.]
  11118.  
  11119. However, if you are ever dropped from the list, you can always find the
  11120. digests on
  11121.  
  11122. ftp://gaea.kgs.ukans.edu/applescript/docs/digests/
  11123.  
  11124. >On a related topic, what do you get when you buy the AppleScript user-version
  11125. >from APDA?  Any doc?  Is there any electronic documentation about the basics
  11126. >of AppleScript?  I've search the latest bookmark CD, but found nothing.
  11127.  
  11128. You get the AppleScript Language Guide, the Getting Started Guide, and the
  11129. Scripting Additions Guide. You'll find the HyperCard stack Language at a
  11130. Glance in
  11131.  
  11132. ftp://gaea.kgs.ukans.edu/applescript/docs/Language_at_a_Glance.sit.hqx
  11133.  
  11134. pf
  11135. =========================================================================
  11136. Date:         Fri, 29 Apr 1994 14:28:54 -0700
  11137. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11138. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11139. From:         David Ray <daver@NETCOM.COM>
  11140. Subject:      Re: Dialog Box
  11141.  
  11142. >>>Simple question follows.  Given a dialog box that comes up with some text
  11143. >>>highlighted and buttons to choose, cancel connect, how do I tell it to
  11144. >>>choose a specific button?  Thanks.
  11145. >
  11146. >As soon as I mailed that I realized that the answer I know of is QuicKeys
  11147. >3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  11148. >your QK script which pushes the buttons from the Script Editor and call
  11149. >that from your more complete and functional script.
  11150. >
  11151. >It's getting late.  ;)
  11152. >
  11153. >Jon
  11154.  
  11155. Another less expensive option is the AutoType osax (shareware). You can always
  11156. use it to click on the highlighted button (with 'enter' or 'control-m'), and
  11157. in some cases control other buttons (when they have command-key equivalents).
  11158. I managed to write a scipt to control Fetch to enter passwords and 'put'
  11159. files using these techniques.
  11160.  
  11161. -Dave
  11162. daver@netcom.com
  11163. =========================================================================
  11164. Date:         Fri, 29 Apr 1994 14:36:00 -0700
  11165. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11166. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11167. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  11168. Subject:      Re: Debugging applescripts
  11169.  
  11170. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  11171. >similarities between AppleScript and HyperCard but there certainly isn't
  11172. >the debugger that HyperCard has (unless I'm missing something).  Can you
  11173. >display the value of variables, set break-points, etc?
  11174.  
  11175. You can (1) look at what the target application does about what you tell it
  11176. to do;
  11177.    (2) display dialogs at key points (if the key values you care about can
  11178. be made into strings)
  11179.  
  11180.    (3) see the result of the last operation executed in the result window
  11181. (it does a little better about what it can manage to show you)
  11182.  
  11183. [Or you can switch to Frontier, whose debugging support lets you single
  11184. step, look at variables, change variables and do other interesting
  11185. debugging stuff.  But only for UserTalk scripts, not for AppleScript ones
  11186. you happen to write in the Frontier editor.]
  11187.  
  11188.    --John
  11189.  
  11190. --
  11191. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  11192. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  11193. =========================================================================
  11194. Date:         Fri, 29 Apr 1994 14:42:23 -0700
  11195. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11196. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11197. From:         Edmund Lai <lai@APPLE.COM>
  11198. Subject:      Re: AS Interpreter
  11199.  
  11200. >Or you can just type stuff into a field in HyperCard and execute it at the
  11201. >press of return or enter or whatever you choose.
  11202. >
  11203. >My Messenger application has that AS feature. Messenger is for one-to-one
  11204. >chatting over AppleTalk LANs, but you can also type AppleScript commands
  11205. >and select "Do AppleScript Commands" from the AS menu.
  11206. >
  11207. >Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
  11208. >application, and is available at sumex-aim, umich and all their mirrors.
  11209. >
  11210. >-DM
  11211. >
  11212. >
  11213.  
  11214. It really takes very little effort to write a message box that you can
  11215. type in AppleScript commands and execute it. All it takes is a few OSA
  11216. calls. It was planned that way so that one can easily write and execute
  11217. a script from anywhere.
  11218.  
  11219. The fact it can be easily done does not mean that it will be done.
  11220. Right now you can only do it from applications that can be considered
  11221. to be scripting utilities. So it would be nice if there is a way to do
  11222. a universial message box without making any changes to the applications.
  11223.  
  11224. Actually there are Mac toolbox manager that were never meant to be used
  11225. for scripting that can be helpful. That is the Text Service Manager (TSM)
  11226. which is used for input method of Chinese and Japanese system. The two
  11227. seem completely unrelated, so it is not a perfect fit to use the TSM for
  11228. AppleScript message box, and it is difficult to convince people that TSM
  11229. should be modified so that it can serve the purpose of being used as an
  11230. AppleScript message box. For one thing this means that it would only work
  11231. under the the Chinese or Japanese OS. This is not a problem for me since
  11232. I do have the Chinese OS installed for my own machine, but very few others
  11233. have.
  11234.  
  11235. Why is the TSM useful for a message box? TSM provides floating window
  11236. which is above every application layer which is ideal for message box.
  11237. It can be invoked from about any application doing text input and allows
  11238. the choice of a font, and that covers lots of applications. TSM provides
  11239. a system wide menu on the right hand side of the menu bar and that is
  11240. ideal for a script menu. TSM listens to low level events such as
  11241. keystrokes and reports them to the "input methods" so it has the
  11242. potential to be used for low level recording. It is unfortunate that
  11243. it is not being taken advantage of.
  11244.  
  11245. Anyway I have experiment with using TSM as an message box. I have
  11246. been working on a Chinese input method on my spare time and it is
  11247. only a slight diversion to also use it as a message box. It is not
  11248. perfect. Since normally it is a Chinese input method, it would
  11249. treat you AppleScript statement as input for Chinese and try to
  11250. turn it into Chinese, sometimes with very funny result. At the
  11251. end you need to execute from the menu to tell the input method
  11252. that what you typed in is not Chinese input but it is AppleScript
  11253. statement. Also since I connect and disconnect from AppleScript
  11254. for each execution, it potentially load and unload AppleScript
  11255. every time so it is very slow unless you force AppleScript to
  11256. stay loaded by having Script Editor running. It is really an
  11257. experiment rather than the real thing but the bottom line is
  11258. that it works.
  11259.  
  11260. Note that this is different from having a "message box" in HyperCard
  11261. and talking to another application. The message box is right inside
  11262. the application and talking to the application directly, so there
  11263. is no need to have "tell application x". I have only tried it
  11264. on the Scriptable Text Editor, from this message box you can type
  11265. and execute statement like
  11266.  
  11267. select word 4 of window 1
  11268.  
  11269. or
  11270.  
  11271. delete word 1 through 5 of window 1
  11272.  
  11273. or
  11274.  
  11275. current date as string
  11276.  
  11277. The last command returns a result and it will be put back into the
  11278. current selection of the document.
  11279.  
  11280. In this way potential every application can have a message box like
  11281. HyperCard that you can use to talk to the application.
  11282.  
  11283. It would be interesting to do it to the scriptable finder, however
  11284. Chinese input is disabled in the Finder. I think I may need to do
  11285. it to a Chinese version of the Finder.
  11286.  
  11287. What we have been doing with scripting just touches the surface,
  11288. the potential is unlimited.
  11289.  
  11290. /* Disclaimer: All statments and opinions expressed are my own */
  11291. /* Edmund K. Lai                                               */
  11292. /* Apple Computer, MS303-3A                                    */
  11293. /* 20525 Mariani Ave,                                          */
  11294. /* Cupertino, CA 95014                                         */
  11295. /* (408)974-6272                                               */
  11296. zW@h9cOi
  11297.  
  11298. /* Disclaimer: All statments and opinions expressed are my own */
  11299. /* Edmund K. Lai                                               */
  11300. /* Apple Computer, MS303-3A                                    */
  11301. /* 20525 Mariani Ave,                                          */
  11302. /* Cupertino, CA 95014                                         */
  11303. /* (408)974-6272                                               */
  11304. zW@h9cOi
  11305. =========================================================================
  11306. Date:         Fri, 29 Apr 1994 16:42:06 -0700
  11307. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11308. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11309. From:         Steve Michel <michel@NETCOM.COM>
  11310. Subject:      Re: Applescript substring problem
  11311.  
  11312. George,
  11313.  
  11314. Your problem is coming because Offset is a property used by Scriptable Text
  11315. Editor. So, when you want to use the Offset Scripting Addition inside a
  11316. tell block for the Scriptable Text Editor, you have to use "my" to make
  11317. sure the OSAX is used, and not the STE property. Change the offending line
  11318. to read:
  11319.  
  11320. set x to (my offset of ": " in str)
  11321.  
  11322. and it compiles fine (or did for me).
  11323.  
  11324. Steve
  11325. =========================================================================
  11326. Date:         Fri, 29 Apr 1994 21:05:47 -0400
  11327. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11328. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11329. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  11330. Subject:      Eudora event to Frontmost?
  11331.  
  11332. I was trying to have Eudora notify a Frontmost application.  I started by
  11333. using a code fragment that worked fine from the Script Editor.  Namely,
  11334. after telling Eudora which application it should notify, I had a handler
  11335. that looked something like:
  11336.  
  11337. on <<event CSOmeNot>> msgList
  11338.         copy (count of items in msgList) to newMsgs
  11339.         beep newMsgs
  11340. end <<event CSOmeNot>>
  11341.  
  11342. However, in my Frontmost application it seems as if it never gets the
  11343. event.  Is there any reason why the application shouldn't get the event?  I
  11344. wasn't getting any errors, either.  Is the problem the aete resource in the
  11345. Frontmost app (which doesn't exist in the apple script app?  Thanks,
  11346.  
  11347.                                 -Steve.
  11348.  
  11349.  
  11350. | Steven L. Rohall                                             |
  11351. |                            ________ _        ______  ______  |
  11352. | 55 Walkers Brook Drive        /    / \      /     / /     /  |
  11353. | Reading, MA 01867-3297       /    /___\    /______ /         |
  11354. | Tel: (617)942-2000          /    /     \         //          |
  11355. | Fax: (617)942-7100         /    /       \/______//______/    |
  11356. | slrohall@tasc.com                                            |
  11357. | (MIME-conformant mail welcome.)                              |
  11358. =========================================================================
  11359. Date:         Fri, 29 Apr 1994 21:21:40 -0400
  11360. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11361. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11362. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  11363. Subject:      Re: Eudora event to Frontmost?
  11364.  
  11365. Earlier I said:
  11366. >I was trying to have Eudora notify a Frontmost application.  I started by
  11367. >using a code fragment that worked fine from the Script Editor.  Namely,
  11368. >after telling Eudora which application it should notify, I had a handler
  11369. >that looked something like:
  11370. >
  11371. >on <<event CSOmeNot>> msgList
  11372. >        copy (count of items in msgList) to newMsgs
  11373. >        beep newMsgs
  11374. >end <<event CSOmeNot>>
  11375. >
  11376. ...
  11377.  
  11378. I should note that if my Frontmost app is not running when Eudora tries to
  11379. send the event, my app will be launched--so it looks like the event is
  11380. getting there.  But, my handler doesn't seem to be getting called.  Is the
  11381. event being caught somewhere else?
  11382.  
  11383.                                 -Steve.
  11384. =========================================================================
  11385. Date:         Fri, 29 Apr 1994 19:43:46 -0700
  11386. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11387. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11388. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  11389. Subject:      Re: App to run script at shutdown?
  11390.  
  11391. >Does anyone know of an application that lets you create a "shutdown
  11392. >script"?  A script that runs when you restart or shutdown your Mac?
  11393.  
  11394. One of the almost hidden extras on the AppleScript 1.1 Developer Kit is an
  11395. extension which enables a Shutdown Items folder (a sibling of the Startup
  11396. Items folder).  The brief note in the readme suggests that it operates at
  11397. shutdown time the way Startup Items does at startup time.  [Before, one
  11398. hopes, Finder concludes that it has managed to shut everyone down.]
  11399.  
  11400. Said to work with System 7.1 and later.  Likely part of the base release in 
  11401. 7.5.
  11402.  
  11403.    --John (who wonders how many CDs it will take to hold System 7.5...)
  11404.  
  11405. --
  11406. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  11407. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  11408. =========================================================================
  11409. Date:         Fri, 29 Apr 1994 21:57:43 -0500
  11410. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11411. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11412. From:         Kelly A Campbell <camel@CIS.KSU.EDU>
  11413. Subject:      jon's commands question
  11414. In-Reply-To:  <199404300151.UAA21950@depot.cis.ksu.edu> from "George R. Brown"
  11415.               at Apr 29, 94 04:41:31 pm
  11416.  
  11417.   I saw something about Jon's cammands on here, and I was wondering
  11418. what that was exactly. I checked at gaea, but didn't find anything there.
  11419.  
  11420. Thanks,
  11421. Kelly
  11422. --
  11423. ,---------------------------------------------------------.
  11424. | Kelly A. Campbell      |       Kansas State University  |
  11425. | camk@ksu.ksu.edu       |       Student Publications     |
  11426. | camel@cis.ksu.edu      |       Macintosh Tech Support   |
  11427. `---------------------------------------------------------'
  11428. =========================================================================
  11429. Date:         Fri, 29 Apr 1994 20:02:36 -0700
  11430. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11431. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11432. From:         Jon Pugh <jonpugh@NETCOM.COM>
  11433. Subject:      Re: Stuff
  11434.  
  11435. >My next thing to look for is a way to access dictionaries from a
  11436. >script.
  11437.  
  11438. I have a set of half+ completed osaxen that will do this.  They support the
  11439. Get Event Info, Get Class Info, Get Suite Info, & Get Enumeration Info
  11440. events.  They work by parsing the aete and returning records with the
  11441. corresponding info.  I haven't had a chance to work on it for a while and
  11442. was wondering if people really wanted this functionality.  It was
  11443. originally intended to be part of AppleScript, but it was deemed marginally
  11444. useful (No one's going to want to get a dictionary from a script) and thus
  11445. dropped.  My plan is to complete them, but it's fairly low on my list.
  11446.  
  11447. >I'm aware that some of what I'd like to do might be doable
  11448. >using the scriptable text parsing of a MacPerl, but launching
  11449. >that is overkill for the current project, in which I'd like
  11450. >to parse the result of "current date" to build a string like
  11451. >"940427" to append to the name of a backup file.
  11452.  
  11453. This is on my list too, but higher up.  I'm planning a formatted date osax
  11454. which will allow you to specify a string and get a date in that format.
  11455.  
  11456. Jon
  11457. =========================================================================
  11458. Date:         Fri, 29 Apr 1994 22:23:12 -0500
  11459. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11460. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11461. From:         Jonathan Bauer <jhbauer@PANIX.COM>
  11462. Subject:      Re: Mail document to person as Eudora Attachment
  11463.  
  11464. >The attached file is an applet that takes any file droped onto it and mails
  11465. >it off to the person specified in the file.  I would change it to a bogus
  11466. >email address as the default, except something seems to have happened to my
  11467.  
  11468. Of course I don't really know what I'm doing, so take with a grain (or ton)
  11469. of salt, but when I double click your attachment I get the following error:
  11470.  
  11471.         Could not run the script "Mail to Peter" because the
  11472.         script's data format  is too new for the scripting format
  11473.         to read it.
  11474.         -1759
  11475.  
  11476. What does this mean??
  11477.  
  11478. thanks,
  11479.  
  11480. /jonathan
  11481.  
  11482. ----------------------------------
  11483. Jonathan Bauer <jhbauer@panix.com>
  11484. 440 W. 41st St. #202
  11485. N.Y. N.Y.  10036
  11486. +1 212-239-5158
  11487. =========================================================================
  11488. Date:         Sat, 30 Apr 1994 15:39:39 +0800
  11489. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11490. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11491. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  11492. Subject:      Re: Mail document to person as Eudora Attachment
  11493.  
  11494. >        Could not run the script "Mail to Peter" because the
  11495. >        script's data format  is too new for the scripting format
  11496. >        to read it.
  11497. >        -1759
  11498. >
  11499. >What does this mean??
  11500.  
  11501. I think it is apple's way of telling you that someone else has received a
  11502. bundled copy or spent the dollars for Applescript 1.1 and now it is your
  11503. turn to do the same :-(
  11504.  
  11505. There was a message that went through with an improved salt-free version of
  11506. the script.  I suspect that just copying that text would be a better way of
  11507. doing it.
  11508.  
  11509. What is the concensus people?  Was my posting the applet a mistake?  Should
  11510. I in the future cut and paste the script?  Is this is the FAQ which I
  11511. probably haven't read?  Can anyone see a good reason to post the applet?
  11512.  
  11513. Craig
  11514.  
  11515. --
  11516. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  11517. The University of Western Australia      or 380 3860 Email for FAX Number
  11518. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  11519. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  11520. =========================================================================
  11521. Date:         Sat, 30 Apr 1994 11:08:54 -0500
  11522. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11523. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11524. From:         Michael Kilgore <mak@TICIPA.WORKS.TI.COM>
  11525. Organization: Texas Instruments, Inc.
  11526. Subject:      Re: Mail document to person as Eudora Attachment
  11527.  
  11528. >[...]  Was my posting the applet a mistake?  Should
  11529. >I in the future cut and paste the script?
  11530.  
  11531. Well, I guess there are times when the script is not enough, such as when
  11532. the applet has resources; so in principle people should send whatever is
  11533. needed to illustrate the problem.
  11534.  
  11535. But my preference would be for a wrapper, such as a .sit file, around the
  11536. real material.  It was a little startling to have SAM suddenly announce to
  11537. me that something wanted to create an app; having a wrapped file would
  11538. allow me to defer that decision.  (But my reaction may be because I haven't
  11539. adapted yet to what MIME can do for me, or because I'm not configuring
  11540. Eudora to best advantage; so feel free to discount the suggestion.)
  11541.  
  11542. --
  11543. Michael Kilgore     (214)917-2219
  11544. =========================================================================
  11545. Date:         Sat, 30 Apr 1994 13:10:37 -0400
  11546. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11547. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11548. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  11549. Subject:      Re: Exporting Records
  11550. In-Reply-To:  <no.id> from "Roy Rapoport" at Apr 28, 94 06:02:04 pm
  11551.  
  11552. --Roy Rapoport wrote:
  11553. >
  11554. >Exporting Records
  11555. >Anyone know of a way for AppleScript to tell FileMaker Pro to export found
  11556. >records into a file?
  11557.  
  11558.     Not directly. There is no export AS command for FM Pro. What you can
  11559. do is have a FM script that exports data and then call that script with
  11560. a do script command, but this isn't very flexable.
  11561.  
  11562. -Hades
  11563. =========================================================================
  11564. Date:         Sat, 30 Apr 1994 10:21:38 -0700
  11565. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11566. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11567. From:         Mike Cohen <isis@NETCOM.COM>
  11568. Subject:      Re: Mail document to person as Eudora Attachment
  11569. In-Reply-To:  <199404301717.KAA29776@mail.netcom.com> from "Michael Kilgore" at
  11570.               Apr 30, 94 11:08:54 am
  11571.  
  11572. >
  11573. > >[...]  Was my posting the applet a mistake?  Should
  11574. > >I in the future cut and paste the script?
  11575. >
  11576. > Well, I guess there are times when the script is not enough, such as when
  11577. > the applet has resources; so in principle people should send whatever is
  11578. > needed to illustrate the problem.
  11579. >
  11580. > But my preference would be for a wrapper, such as a .sit file, around the
  11581. > real material.  It was a little startling to have SAM suddenly announce to
  11582. > me that something wanted to create an app; having a wrapped file would
  11583. > allow me to defer that decision.  (But my reaction may be because I haven't
  11584. > adapted yet to what MIME can do for me, or because I'm not configuring
  11585. > Eudora to best advantage; so feel free to discount the suggestion.)
  11586. >
  11587. > --
  11588. > Michael Kilgore     (214)917-2219
  11589. >
  11590. I was a little surprised when I double-clicked it assuming it was a .SEA file
  11591. (I don't have my downloads window view by icons). BTW, I've improved it
  11592. slightly to allow a recipient and short message to be entered.
  11593.  
  11594. --
  11595. Mike Cohen           | "Software that means business"
  11596. ISIS International   |
  11597. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  11598. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  11599. =========================================================================
  11600. Date:         Sat, 30 Apr 1994 10:24:34 -0800
  11601. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11602. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11603. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  11604. Subject:      Re: Mail document to person as Eudora Attachment
  11605.  
  11606. >What is the concensus people?  Was my posting the applet a mistake?  Should
  11607. >I in the future cut and paste the script?  Is this is the FAQ which I
  11608. >probably haven't read?  Can anyone see a good reason to post the applet?
  11609.  
  11610. I concur with the idea of putting it in a wrapper such as stuffit. I too
  11611. was a bit surprised to see an applet appear on my hard drive.
  11612.  
  11613. Kee Nethery
  11614.  
  11615. _________________________________________________________________
  11616. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  11617. =========================================================================
  11618. Date:         Sat, 30 Apr 1994 11:12:53 -0800
  11619. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11620. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11621. From:         Ed Lai <lai@APPLE.COM>
  11622. Subject:      Scriptable  fractal program
  11623.  
  11624. This is from comp.sys.mac.apps, it sounds interesting to this group. Can
  11625. someone who has access to AOL or CompuServe download it and make it
  11626. available for ftp?
  11627.  
  11628. ******************************************
  11629.  
  11630. Listed below is the release information for Color Fractal Generator 2.1.  This
  11631. is a fractal program which provides extensive support for Frontier and
  11632. AppleScript, permitting users to automate searches and even create fractal
  11633. movies through scripting (it also creates beautiful fractal images).  This
  11634. program is available on America Online, CompuServe, and Ziff-Net Mac.  I do not
  11635. have access to ftp to upload this to Internet.  The program is Shareware
  11636. (registration fee $15).  You may obtain the THINK C source code for $40.  The
  11637. registration fees may be sent to:
  11638.  
  11639. John A. Schlack
  11640. 824 Rhoads Avenue
  11641. Jenkintown, Pa. 19046.
  11642.  
  11643. Send me E-mail if you have additional questions or comments (John40@aol.com).
  11644.  
  11645.  
  11646. Color Fractal Generator 2.1 is a major upgrade of the previously released
  11647. versions.  Scripting support has been added including an extensive set of
  11648. verbs, shared menus, and a quick script utility.  In addition to native CFG
  11649. palettes, this program can load palettes from resources of type 'clut' and
  11650. 'pltt'.  One may select the floating point display precision, anywhere from 3
  11651. to 18 digits.  Additional standard window sizes have been added to the Size
  11652. menu.  The coloring method for 4 and 8 bit systems has been dramatically
  11653. improved.
  11654.  
  11655. Other significant features include: support for 4, 8, 16, and 32-bit color,
  11656. full background processing, building multiple fractals simultaneously,
  11657. palettes, saving a fractal during generation and then restarting where left off
  11658. (registered users), both a help dialog providing extensive online support and
  11659. balloon help for quick reminders, System 7.0 features, and support for
  11660. computers with and without math coprocessors.
  11661.  
  11662. This program generates beautiful color Mandelbrot, Julia, Dragon, and Random
  11663. Walk fractals and provides near unlimited maneuvering through the fractal
  11664. world.  The program requires a Mac with Color QuickDraw, 16+ color monitor, and
  11665. System 6.05 or later (including System 7.0).  System 6.0x requires MultiFinder.
  11666.  The program can run in 32-bit addressing mode.
  11667.  
  11668. Scripting is now the most prominent feature of CFG.  This program has the
  11669. appropriate code to handle both AppleScript and UserLand Frontier.  Using the
  11670. scripting capabilities is definitely not required to generate great fractals
  11671. using CFG, but it does provide the user with the ability to extend the power of
  11672. this program.  One can write scripts to provide simple utilities that make CFG
  11673. easier to use (such as the Stack Windows sample script), automate the
  11674. exploration of the fractal universe, or even create fractal movies.
  11675.  
  11676. You also have an opportunity to obtain the FULL SOURCE CODE in THINK C 6.0
  11677. format.  Download the product for more information.
  11678.  
  11679. This version of the program cannot save fractal graphics.  Saving the images is
  11680. a feature added when the user registers.  Please note that the fractal's
  11681. parameters may be saved permitting recreation of the fractal at any time.
  11682.  
  11683. ******************************************
  11684.  
  11685. /* Disclaimer: All statments and opinions expressed are my own */
  11686. /* Edmund K. Lai                                               */
  11687. /* Apple Computer, MS303-3A                                    */
  11688. /* 20525 Mariani Ave,                                          */
  11689. /* Cupertino, CA 95014                                         */
  11690. /* (408)974-6272                                               */
  11691. zW@h9cOi
  11692. =========================================================================
  11693. Date:         Sat, 30 Apr 1994 18:20:07 -0400
  11694. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11695. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11696. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  11697. Subject:      Writing OSAXen
  11698.  
  11699. Are there any docs on how to write an OSAX, other than the docs presumably
  11700. sold by Apple?
  11701.  
  11702. Bob
  11703.  
  11704. --
  11705. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  11706. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  11707.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  11708. =========================================================================
  11709. Date:         Sat, 30 Apr 1994 17:24:42 -0500
  11710. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11711. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11712. From:         Fred Terry <pfterry@LKS.CSI.COM>
  11713. Subject:      Re: Scriptable fractal program
  11714. In-Reply-To:  Your message of "Sat, 30 Apr 94 11:12:53 -0900"
  11715.  
  11716. Ed Lai writes .....
  11717.  
  11718. >This is from comp.sys.mac.apps, it sounds interesting to this group. Can
  11719. >someone who has access to AOL or CompuServe download it and make it
  11720. >available for ftp?
  11721. >
  11722. >******************************************
  11723. >
  11724. >Listed below is the release information for Color Fractal Generator 2.1.  This
  11725. >is a fractal program which provides extensive support for Frontier and
  11726. >AppleScript, permitting users to automate searches and even create fractal
  11727. >movies through scripting (it also creates beautiful fractal images).  This
  11728. >program is available on America Online, CompuServe, and Ziff-Net Mac.  I do no
  11729. >t
  11730. >have access to ftp to upload this to Internet.  The program is Shareware
  11731. >(registration fee $15).  You may obtain the THINK C source code for $40.  The
  11732.  
  11733. You'll find it on gaea.kgs.ukans.edu in
  11734.  
  11735. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/CFG2.1UR.sit.hqx
  11736.  
  11737. Enjoy.
  11738.  
  11739. pf
  11740.  
  11741.  
  11742.  
  11743.  
  11744.